Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

        def monotonic_clock():
    if not _rtlib:
        _init_library()

    timespec = _timespec_t()
    if _rtlib.clock_gettime(CLOCK_MONOTONIC_RAW, byref(timespec)) != 0:
        raise OSError(ctypes.get_errno(), "clock_gettime failed")

    return timespec.tv_nsec + (timespec.tv_sec * SEC_IN_NSEC)
        


src/i/n/infi.monotonic_time-0.1.3/src/infi/monotonic_time/__init__.py   infi.monotonic_time(Download)
system = platform.system()
if system == "Linux":
    from .linux import monotonic_clock, time_to_monotonic, time_from_monotonic
elif system == "Darwin":
    from .darwin import monotonic_clock, time_to_monotonic, time_from_monotonic