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:
Philippe Houdoin 2010-10-09 08:28:46 +00:00
parent 82539c6155
commit 5b2ed54046
1 changed files with 1 additions and 1 deletions

View File

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