示例#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()
示例#2
0
文件: timeutils.py 项目: com4/eventmq
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()
示例#3
0
def monotonic(state):
    """Get the current value for the monotonic clock"""
    return {"monotonic": _monotonic()}
示例#4
0
 def __exit__(self, exc_type, exc_val, exc_tb):
     self.end = _monotonic()
示例#5
0
 def __enter__(self):
     self.begin = _monotonic()
     return self