-
Notifications
You must be signed in to change notification settings - Fork 1
Time
Jean Dubois edited this page Oct 9, 2023
·
7 revisions
The time module can be imported with the statement import time.
The time module is used to sleep for seconds or milliseconds, and to know current time, timezone and system’s epoch.
-
time.sleep(seconds): pauses the program for seconds and do nothing. ReturnsNone. -
time.sleep_milliseconds(milliseconds): pauses the program for milliseconds and do nothing. ReturnsNone. -
time.time(): returns the float value of the time in seconds since the Epoch (system-dependent, check your epoch withtime.epoch()). -
time.epoch(): returns the str value of the Epoch of your system.
-
time.timezone: the timezone (number of seconds to add to GMT)