$NetBSD: patch-ab,v 1.2 2011/12/14 13:35:47 abs Exp $ usleep is not guaranteed to work for arguments >= 1,000,000 --- src/os_unix.c.orig 2008-06-20 03:11:39.000000000 +0000 +++ src/os_unix.c 2008-06-20 03:13:09.000000000 +0000 @@ -31,5 +31,9 @@ void os_sleep_ms(int ms) { - usleep(ms*1000); + /* usleep is not guaranteed to work for arguments >= 1,000,000 */ + if( ms >= 1000 ) + sleep( ms/1000 ); + else + usleep(ms*1000); }