Lower resolution for JS target
Right now 64 bit integers in JavaScript are kind of flaky, and Nim's JS compiler takes any 64 bit integer and puts it down to 32 bit. This really sucks since within running the stopwatch for less than 15 seconds you'll get an overflow error if you compile to JS. The only fix for this at the moment is to lower the resolution. I'm not sure how this will effect the Node JS target, so we'll leave that at 64 bit right now. (Also Node's JS environment is different from that of a browsers)
-
Separate the stopwatch.nim
file into a JS & Non-JS target privates, depending upon the detected target, use that private one -
Remove some of the higher resolution functions from the JS target, leaving us only with milliseconds. -
Update the README with this info. Maybe throw some compiler warning/errors too?