Python Time Module
Time access and conversions — time, sleep, strftime, perf_counter. This category documents 8 Python time module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: time.time(), time.sleep(), time.gmtime(), time.localtime(), time.strftime(), time.strptime(), time.perf_counter(), time.monotonic(). time.time() returns the current Unix timestamp (seconds since epoch). time.sleep() suspends execution for the given number of seconds (may be fractional). time.gmtime() converts a timestamp to a time.struct_time in UTC. time.localtime() converts a timestamp to a time.struct_time in local time. time.strftime() formats a time.struct_time as a string according to format. For a structured walkthrough of the whole topic, read the Time Module guide. Time Module belongs to the Math & Stats group alongside Math Module, Statistics Module, Random Module, Decimal Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground.