This commit is contained in:
Vitor Santos Costa
2018-09-26 01:14:14 +01:00
parent 13d609867c
commit 87c6971bb6
12 changed files with 64 additions and 135 deletions

View File

@@ -1872,7 +1872,7 @@ static Int p_sleep(USES_REGS1) {
Term ts = ARG1;
#if defined(__MINGW32__) || _MSC_VER
{
unsigned long int secs = 0, usecs = 0, msecs, out;
unsigned long int secs = 0, usecs = 0, msecs;
if (IsIntegerTerm(ts)) {
secs = IntegerOfTerm(ts);
} else if (IsFloatTerm(ts)) {
@@ -1902,7 +1902,7 @@ static Int p_sleep(USES_REGS1) {
req.tv_sec = IntOfTerm(ts);
}
out = nanosleep(&req, NULL);
return true;
return out == 0;
}
#elif HAVE_USLEEP
{