The time Module for Timing and Delays in Python


Use the time module for timing operations or adding delays.

Source Code

import time
start = time.time()
time.sleep(1)  # Sleep for 1 second
end = time.time()
print(f"Elapsed time: {end - start} seconds")
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments