Overview:
-
The timedelta class represents a quantity of time.
-
The attribute timedelta.resolution is the smallest quantity that can be represented using the datetime.timedelta class.
-
The value of timedelta.resolution is currently one microsecond.
-
A microsecond is one millionth of one second.
Example:
# Example Python program that prints the # Construct a duration of 1 hours, 2 minutes, 3 seconds and # Print the smallest supported time duration |
Output:
1:02:03.000004 <class 'datetime.timedelta'> 0:00:00.000001 <class 'datetime.timedelta'> |