Here's an implementation of the _sleep_r
function in Python:
main.py443 chars21 lines
This uses the time
module to sleep for the given amount of time, and keeps track of the remaining time to sleep until the full amount of time has elapsed. It recursively calls itself with the remaining time until there is no more time left to sleep.
gistlibby LogSnag