mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Putting a thread to sleep

Wrappers for std::this_thread::sleep_for

Functions

void mx::sys::sleep (unsigned sec)
 Sleep for a specified period in seconds. More...
 
void mx::sys::milliSleep (unsigned msec)
 Sleep for a specified period in milliseconds. More...
 
void mx::sys::microSleep (unsigned usec)
 Sleep for a specified period in microseconds. More...
 
void mx::sys::nanoSleep (unsigned nsec)
 Sleep for a specified period in nanoseconds. More...
 

Function Documentation

◆ microSleep()

void mx::sys::microSleep ( unsigned  usec)

Sleep for a specified period in microseconds.

Test:
Verify operation of thread sleep functions. [test doc]
Parameters
[in]usecthe number of microseconds to sleep.

Definition at line 61 of file timeUtils.cpp.

Referenced by SCENARIO().

◆ milliSleep()

void mx::sys::milliSleep ( unsigned  msec)

Sleep for a specified period in milliseconds.

Test:
Verify operation of thread sleep functions. [test doc]
Parameters
[in]msecthe number of milliseconds to sleep.

Definition at line 56 of file timeUtils.cpp.

Referenced by SCENARIO().

◆ nanoSleep()

void mx::sys::nanoSleep ( unsigned  nsec)

Sleep for a specified period in nanoseconds.

Test:
Verify operation of thread sleep functions. [test doc]
Parameters
[in]nsecthe number of microseconds to sleep.

Definition at line 66 of file timeUtils.cpp.

Referenced by SCENARIO().

◆ sleep()

void mx::sys::sleep ( unsigned  sec)

Sleep for a specified period in seconds.

Test:
Verify operation of thread sleep functions. [test doc]
Parameters
[in]secthe number of seconds to sleep.

Definition at line 51 of file timeUtils.cpp.

Referenced by SCENARIO().