Exemplo n.º 1
0
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()
Exemplo n.º 2
0
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()
Exemplo n.º 3
0
def monotonic(state):
    """Get the current value for the monotonic clock"""
    return {"monotonic": _monotonic()}
Exemplo n.º 4
0
 def __exit__(self, exc_type, exc_val, exc_tb):
     self.end = _monotonic()
Exemplo n.º 5
0
 def __enter__(self):
     self.begin = _monotonic()
     return self