Platform::wait(): Never wait on zero delay

This commit is contained in:
Ilari Liusvaara 2014-01-05 15:31:50 +02:00
parent d72711e7cb
commit e42a606ae8

View file

@ -588,6 +588,9 @@ void platform::wait(uint64_t usec) throw()
internal_run_queues(true);
if(queue_function_run)
reload_lua_timers();
//If usec is 0, never wait (waitleft can be nonzero if time counting screws up).
if(!usec)
return;
now = get_utime();
uint64_t waitleft = 0;
waitleft = (now < continue_time) ? (continue_time - now) : 0;