Skip to main content

convenience routines for times and timing

Project description

Convenience routines for timing.

Latest release 20211208: Move the TimeoutError definiton to cs.gimmicks.

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.

Release Log

Release 20211208: Move the TimeoutError definiton to cs.gimmicks.

Release 20190220: Backport for older Pythons.

Release 20190101: Define TimeoutError only if missing.

Release 20170608: Trivial changes, nothing semantic.

Release 20150116: PyPI initial prep.

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-20211208.tar.gz (2.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: cs.timeutils-20211208.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for cs.timeutils-20211208.tar.gz
Algorithm Hash digest
SHA256 6d8c076498f294af9037cd45815c807f2ce1ce5915ecb3c4ac41e5c2c159bbe2
MD5 4c10f74a2bb80841d18f2e4c846261c4
BLAKE2b-256 dc7d9f16ba707154be12c5e489ea5a60c2815b1c8cb2c705793f9bb8dacbb3a0

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