getkyo / kyo

Toolkit for Scala Development
https://getkyo.io
Apache License 2.0
559 stars 47 forks source link

[core] Clock.nowMonotonic + fix flaky tests in JS #820

Closed fwbrasil closed 3 weeks ago

fwbrasil commented 3 weeks ago

Time-based tests are flaky in JS. It seems the default timer implementation has precision issues. This PR introduces Clock.nowMonotonic to provide more a more accurate Stopwatch and updates test thresholds to account for the timer imprecision.