Fix the fix: sleep() should return *remaining* seconds.
Closed #6707. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38903 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
82539c6155
commit
5b2ed54046
@ -21,7 +21,7 @@ sleep(unsigned seconds)
|
||||
|
||||
err = snooze_until(start + usecs, B_SYSTEM_TIMEBASE);
|
||||
if (err)
|
||||
return (unsigned)((system_time() - start) / 1000000);
|
||||
return seconds - (unsigned)((system_time() - start) / 1000000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user