Skip to main content

convenience routines for times and timing

Project description

Convenience routines for timing.

Function ISOtime(gmtime)

Produce an ISO8601 timestamp string from a UNIX time.

Function sleep(delay)

time.sleep() sometimes sleeps significantly less that requested. This function calls time.sleep() until at least delay seconds have elapsed, trying to be precise.

Function time_from_ISO(isodate, islocaltime=False)

Parse an ISO8601 date string and return seconds since the epoch. If islocaltime is true convert using localtime(tm) otherwise use gmtime(tm).

Function time_func(func, *args, **kw)

Run the supplied function and arguments. Return a the elapsed time in seconds and the function's own return value.

Function tm_from_ISO(isodate)

Parse an ISO8601 date string and return a struct_time.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
cs.timeutils-20190220.tar.gz (2.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page