Removed guac_sleep
This commit is contained in:
parent
c4c30af6a4
commit
8cffca4f13
@ -380,13 +380,5 @@ guac_instruction* guac_protocol_expect_instruction(guac_socket* io, int usec_tim
|
||||
*/
|
||||
guac_timestamp guac_protocol_get_timestamp();
|
||||
|
||||
/**
|
||||
* Suspends execution of the current thread for the given number of
|
||||
* milliseconds.
|
||||
*
|
||||
* @param millis The number of milliseconds to sleep.
|
||||
*/
|
||||
void guac_sleep(int millis);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -576,20 +576,3 @@ guac_timestamp guac_protocol_get_timestamp() {
|
||||
|
||||
}
|
||||
|
||||
void guac_sleep(int millis) {
|
||||
|
||||
#ifdef HAVE_NANOSLEEP
|
||||
struct timespec sleep_period;
|
||||
|
||||
sleep_period.tv_sec = millis / 1000;
|
||||
sleep_period.tv_nsec = (millis % 1000) * 1000000L;
|
||||
|
||||
nanosleep(&sleep_period, NULL);
|
||||
#elif defined(__MINGW32__)
|
||||
Sleep(millis);
|
||||
#else
|
||||
#warning No sleep/nanosleep function available. Clients may not perform as expected. Consider patching libguac to add support for your platform.
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user