Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

time library python

time_not_passed = True
from time import time # You can import the whole module like last time. Just don't forget the time. before to signal it.

init_time = time() # Or time.time() if whole module imported
print("0.00 secs")
while True: # Init loop
    if init_time + 0.05 <= time() and time_not_passed: # Time not passed variable is important as we want this to run once. !!! time.time() if whole module imported :O
        print("0.05 secs")
        time_not_passed = False
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #time #library #python
ADD COMMENT
Topic
Name
6+7 =