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.

Source Distribution

cs.timeutils-20190101.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file cs.timeutils-20190101.tar.gz.

File metadata

  • Download URL: cs.timeutils-20190101.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.6

File hashes

Hashes for cs.timeutils-20190101.tar.gz
Algorithm Hash digest
SHA256 0b2c865779c3fafe85b59abbb57e77a39ceb140c4fb6c337fcacb77eddf8c218
MD5 ee8860b066304e27d6456edeaa7d7b27
BLAKE2b-256 9ffd40b162f5511bdc37f46459c9e4300f16359b1e7d90f57c80b84acdea51f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page