Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #193 from kgksoft/master

"System sleep(s)" not worked properly for s >= 1 second
  • Loading branch information...
commit 5b4898363f254cb8d554fbc1c200c8b8b46f6c03 2 parents 6349b4e + 598b830
@stevedekorte authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 libs/iovm/source/IoSystem.c
View
5 libs/iovm/source/IoSystem.c
@@ -478,6 +478,11 @@ IO_METHOD(IoObject, sleep)
double seconds = IoMessage_locals_doubleArgAt_(m, locals, 0);
unsigned int microseconds = (seconds * 1000000);
+ while (microseconds > 999999)
+ {
+ usleep(999999);
+ microseconds -= 999999;
+ }
usleep(microseconds);
return self;
}
Please sign in to comment.
Something went wrong with that request. Please try again.