You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

clock-nanosleep

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clock-nanosleep

sleep(secs) function that use clock_nanosleep() with CLOCK_MONOTONIC.

1.2
pipPyPI
Maintainers
1

Use clock_nanosleep() with CLOCK_MONOTONIC to sleep. So that the sleep is not affected by system date/time jumps.

Only provide source code distribution, user need to install the build toolchain. It can't be compiled on platforms without clock_nanosleep().

On CPython 3.11+, time.sleep() <https://docs.python.org/3/library/time.html#time.sleep>_ function already use this method.

.. sourcecode:: python

try:
    from clock_nanosleep import sleep
except ImportError:
    from time import sleep

sleep(secs)

Keywords

sleep

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts