cctools
Functions
sleeptools.h File Reference

Sleep for a specified amount of time. More...

#include <time.h>

Go to the source code of this file.

Functions

void sleep_until (time_t stoptime)
 Sleep until a specific time. More...
 
void sleep_for (time_t interval)
 Sleep for a specific interval of time. More...
 

Detailed Description

Sleep for a specified amount of time.

Note that the standard Unix sleep() may be interrupted for a number of reasons. These routines will retry sleep() until the desired condition is reached.

Function Documentation

void sleep_until ( time_t  stoptime)

Sleep until a specific time.

Parameters
stoptimeThe absolute time to wait for.
void sleep_for ( time_t  interval)

Sleep for a specific interval of time.

Parameters
intervalThe number of seconds to wait.