mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-02 14:15:46 +01:00
Fix wusleep
struct timespec's tm_nsec is in nanoseconds, not microseconds. Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
This commit is contained in:
committed by
Carlos R. Mafra
parent
09e6fd1526
commit
c37046e6a9
@@ -16,7 +16,7 @@ void wusleep(unsigned int usec)
|
||||
return;
|
||||
|
||||
tm.tv_sec = usec / 1000000;
|
||||
tm.tv_nsec = usec % 1000000;
|
||||
tm.tv_nsec = (usec % 1000000) * 1000;
|
||||
|
||||
while (nanosleep(&tm, &tm) == -1 && errno == EINTR)
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user