Difference between revisions of "Time (Python)"
(→Time Module(Python)) |
(→importing the time) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | 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 | + | 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 | + | import time |
− | before using this module in your python code. This | + | 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. | ||
+ | # The user who made this page doesn't know everything and there is likely more to the time module and the user simply didn't know. | ||
+ | # if you know anything more, please contribute! |
Latest revision as of 14:18, 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.
- The user who made this page doesn't know everything and there is likely more to the time module and the user simply didn't know.
- if you know anything more, please contribute!