Provides timekeeping functions.
Classes
_class struct_time(object)
Time value returned by various functions.
_let x = struct_time(iterable: tuple)
Create a struct_time from a 9-tuple of int values. The format of iterable
is (tm_year,tm_mon,tm_mday,tm_hour,tm_min,tm_sec,tm_wday,tm_yday,tm_isdst)
.
_property struct_time.tm_hour
Clock hour, [0, 23]
_property struct_time.tm_isdst
0, 1, -1 for unknown
_property struct_time.tm_mday
Day of the month, [1, 31]
_property struct_time.tm_min
Clock minute, [0, 59]
_property struct_time.tm_mon
Month, [1, 12]
_property struct_time.tm_sec
Clock seconds, [0, 61] (maybe, due to leap seconds, depends on platform)
_property struct_time.tm_wday
Day of week, [0, 6], 0 is Monday.
_property struct_time.tm_yday
Day of year [1, 366]
_property struct_time.tm_year
Calendar year
Functions
_asctime(t=time.localtime())
_ctime(secs=time.time())
_gmtime(secs=time.time())
_localtime(seconds=time.time())
_mktime(t)
_sleep(secs)
_strftime(format,t=time.localtime())
Format time string with system function.
Uses the system strftime
C function to convert a struct_time to a string. If t
is not provided, the current localtime is used.
_time()
Return the elapsed seconds since the system epoch.
Returns a float representation of the number of seconds since the platform's epoch date. On POSIX platforms, this is the number of seconds since 1 January 1970. The precision of the return value is platform-dependent.