File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -497,7 +497,8 @@ def test_process_time(self):
497497 self .assertLess (stop - start , 0.020 )
498498
499499 # bpo-33723: A busy loop of 100 ms should increase process_time()
500- # by at least 15 ms
500+ # by at least 15 ms. Tolerate 15 ms because of the bad resolution of
501+ # the clock on Windows (around 15.6 ms).
501502 min_time = 0.015
502503 busy_time = 0.100
503504
@@ -535,8 +536,11 @@ def test_thread_time(self):
535536 self .assertLess (stop - start , 0.020 )
536537
537538 # bpo-33723: A busy loop of 100 ms should increase thread_time()
538- # by at least 15 ms
539+ # by at least 15 ms, but less than 30 ms in other threads.
540+ # Tolerate 15 and 30 ms because of the bad resolution
541+ # of the clock on Windows (around 15.6 ms).
539542 min_time = 0.015
543+ max_time = 0.030
540544 busy_time = 0.100
541545
542546 # thread_time() should include CPU time spent in current thread...
@@ -551,7 +555,7 @@ def test_thread_time(self):
551555 t .start ()
552556 t .join ()
553557 stop = time .thread_time ()
554- self .assertLess (stop - start , min_time )
558+ self .assertLess (stop - start , max_time )
555559
556560 info = time .get_clock_info ('thread_time' )
557561 self .assertTrue (info .monotonic )
You can’t perform that action at this time.
0 commit comments