Difference between revisions of "Time (Python)"
(→Time Module(Python)) |
(→Time Module(Python)) |
||
Line 2: | Line 2: | ||
import time | import time | ||
before using this module in your python code. | before using this module in your python code. | ||
+ | ==time.sleep== | ||
+ | this tells Python to pause for a specific amount of time before continuing. Python will also print any prints that are waiting to be printed while your Pywindow is sleeping. | ||
+ | time.sleep(3) | ||
+ | This will tell python to sleep for 3 seconds. | ||
+ | ==importing the time== | ||
+ | The time module can, in fact, tell the time. typing a command, you can make that command return the time of a specific time zone. | ||
+ | |||
+ | '''disclaimer''' | ||
+ | *the command required to return the time has not been added, if you know how, please contribute to this incomplete page. |
Revision as of 14:15, 6 May 2024
The time module is a module that allows Python to perform specific actions for a limited time. When using the Time module, remember to type
import time
before using this module in your python code.
time.sleep
this tells Python to pause for a specific amount of time before continuing. Python will also print any prints that are waiting to be printed while your Pywindow is sleeping.
time.sleep(3)
This will tell python to sleep for 3 seconds.
importing the time
The time module can, in fact, tell the time. typing a command, you can make that command return the time of a specific time zone.
disclaimer
- the command required to return the time has not been added, if you know how, please contribute to this incomplete page.