Rudiments
Static Public Member Functions | List of all members
snooze Class Reference

Static Public Member Functions

static bool macrosnooze (uint32_t seconds)
 
static bool macrosnooze (uint32_t seconds, uint32_t *secondsremaining)
 
static bool microsnooze (uint32_t seconds, uint32_t microseconds)
 
static bool microsnooze (uint32_t seconds, uint32_t microseconds, uint32_t *secondsremaining, uint32_t *microsecondsremaining)
 
static bool nanosnooze (uint32_t seconds, uint32_t nanoseconds)
 
static bool nanosnooze (uint32_t seconds, uint32_t nanoseconds, uint32_t *secondsremaining, uint32_t *nanosecondsremaining)
 

Detailed Description

The snooze class provides static methods for suspending process execution.

Member Function Documentation

◆ macrosnooze() [1/2]

static bool snooze::macrosnooze ( uint32_t  seconds)
static

Suspend execution for "seconds" seconds. Returns true on success and false on failure. If the snooze is interrupted, it resumes after the interruption until the specified duration has elapsed.

◆ macrosnooze() [2/2]

static bool snooze::macrosnooze ( uint32_t  seconds,
uint32_t *  secondsremaining 
)
static

Suspend execution for "seconds" seconds. Returns true on success and false on failure, or if it was interrupted (usually by a signal). If the snooze is interrupted or failed, "secondsremaining" is populated with the number of seconds that remained. If "secondsremaining" may be NULL then it isn't populated, but the snooze may still be interrupted.

◆ microsnooze() [1/2]

static bool snooze::microsnooze ( uint32_t  seconds,
uint32_t  microseconds 
)
static

Suspend execution for "seconds" seconds and "microseconds" microseconds. Returns true on success and false on failure. If the snooze is interrupted, it resumes after the interruption until the specified duration has elapsed.

◆ microsnooze() [2/2]

static bool snooze::microsnooze ( uint32_t  seconds,
uint32_t  microseconds,
uint32_t *  secondsremaining,
uint32_t *  microsecondsremaining 
)
static

Suspend execution for "seconds" seconds and "microseconds" microseconds. Returns true on success and false on failure, or if it was interrupted (usually by a signal). If the snooze is interrupted or failed, "secondsremaining" and "microsecondsremaining" are populated with the number of seconds and microseconds that remained. If "secondsremaining" or "microsecondsremaining" is NULL then it isn't populated, but the snooze may still be interrupted.

◆ nanosnooze() [1/2]

static bool snooze::nanosnooze ( uint32_t  seconds,
uint32_t  nanoseconds 
)
static

Suspend execution for "seconds" seconds and "nanoseconds" nanoseconds. Returns true on success and false on failure. If the snooze is interrupted, it resumes after the interruption until the specified duration has elapsed.

◆ nanosnooze() [2/2]

static bool snooze::nanosnooze ( uint32_t  seconds,
uint32_t  nanoseconds,
uint32_t *  secondsremaining,
uint32_t *  nanosecondsremaining 
)
static

Suspend execution for "seconds" seconds and "nanoseconds" nanoseconds. Returns true on success and false on failure, or if it was interrupted (usually by a signal). If the snooze is interrupted or failed, "secondsremaining" and "nanosecondsremaining" are populated with the number of seconds and nanoseconds that remained. If "secondsremaining" or "nanosecondsremaining" is NULL then it isn't populated, but the snooze may still be interrupted.