def monotonic(): """ Returns (float) seconds since boot, or something close to it. This value will never count down so it's useful for cases where DST would mess up time.time() arithmetic (e.g. heartbeats). """ return _monotonic()
def monotonic(state): """Get the current value for the monotonic clock""" return {"monotonic": _monotonic()}
def __exit__(self, exc_type, exc_val, exc_tb): self.end = _monotonic()
def __enter__(self): self.begin = _monotonic() return self