1
0
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:
Brad Jorsch
2010-09-30 08:58:19 -04:00
committed by Carlos R. Mafra
parent 09e6fd1526
commit c37046e6a9

View File

@@ -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)
;