File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
core/src/test/scala/org/scalajs/macrotaskexecutor Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,15 @@ class MacrotaskExecutorSuite extends FunSuite {
3232 else
3333 Future .unit.flatMap(_ => loop(n - 1 )).map(_ + 1 )
3434
35- // val start = System.currentTimeMillis()
36- // val MinimumClamp = 10000 * 2 * 4 // HTML5 specifies a 4ms clamp (https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.setTimeout#Minimum.2F_maximum_delay_and_timeout_nesting)
35+ val start = System .currentTimeMillis()
36+ val MinimumClamp = 10000 * 2 * 4 // HTML5 specifies a 4ms clamp (https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.setTimeout#Minimum.2F_maximum_delay_and_timeout_nesting)
3737
3838 loop(10000 ) flatMap { res =>
3939 Future {
40- // val end = System.currentTimeMillis()
40+ val end = System .currentTimeMillis()
4141
4242 assert(res == 10000 )
43- // assert((end - start).toDouble / MinimumClamp < 0.25) // we should beat the clamping by at least 4x even on slow environments
43+ assert((end - start).toDouble / MinimumClamp < 0.25 ) // we should beat the clamping by at least 4x even on slow environments
4444 }
4545 }
4646 }
You can’t perform that action at this time.
0 commit comments