mirror of
https://github.com/EvernodeXRPL/sashimono.git
synced 2026-08-22 19:00:52 +00:00
Introduce message threads and message handling (#4)
This commit is contained in:
@@ -128,4 +128,12 @@ namespace util
|
||||
pthread_sigmask(SIG_BLOCK, &mask, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sleeps the current thread for specified no. of milliseconds.
|
||||
*/
|
||||
void sleep(const uint64_t milliseconds)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(milliseconds));
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
|
||||
@@ -22,6 +22,8 @@ namespace util
|
||||
|
||||
void mask_signal();
|
||||
|
||||
void sleep(const uint64_t milliseconds);
|
||||
|
||||
} // namespace util
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user