time

Stdlib — Date/TimePython 2.0+Beginner

Time access: sleep, monotonic, perf_counter, strftime

Quick Info

Documentation
Official Docs
Python Version
2.0+
Dependencies
None — Python Standard Library
Install
Included with Python

Learn by Difficulty

Quick Example

python
import time

start = time.time()
time.sleep(0.01)
elapsed = time.time() - start
print(f"Elapsed: {elapsed:.4f}s")
print(f"Time: {time.ctime()}")

The time module is part of Python's standard library. Time access: sleep, monotonic, perf_counter, strftime.

Try in Playground

Tags

stdlibdatetimetime