Use Glib::usleep for portability

This commit is contained in:
Tim Mayberry 2013-07-20 10:26:30 +10:00
parent ccaa29d210
commit 486720de61

View File

@ -94,7 +94,7 @@ VideoMonitor::query_full_state (bool wait)
process->write_to_stdin("get osdcfg\n"); process->write_to_stdin("get osdcfg\n");
int timeout = 40; int timeout = 40;
if (wait && knownstate !=127 && --timeout) { if (wait && knownstate !=127 && --timeout) {
usleep(50000); Glib::usleep(50000);
sched_yield(); sched_yield();
} }
} }
@ -113,7 +113,7 @@ VideoMonitor::quit ()
*/ */
int timeout = 40; int timeout = 40;
while (is_started() && --timeout) { while (is_started() && --timeout) {
usleep(50000); Glib::usleep(50000);
sched_yield(); sched_yield();
} }
if (timeout <= 0) { if (timeout <= 0) {