File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -496,7 +496,8 @@ def test_process_time(self):
496
496
self .assertLess (stop - start , 0.020 )
497
497
498
498
# bpo-33723: A busy loop of 100 ms should increase process_time()
499
- # by at least 15 ms
499
+ # by at least 15 ms. Tolerate 15 ms because of the bad resolution of
500
+ # the clock on Windows (around 15.6 ms).
500
501
min_time = 0.015
501
502
busy_time = 0.100
502
503
@@ -534,8 +535,11 @@ def test_thread_time(self):
534
535
self .assertLess (stop - start , 0.020 )
535
536
536
537
# bpo-33723: A busy loop of 100 ms should increase thread_time()
537
- # by at least 15 ms
538
+ # by at least 15 ms, but less than 30 ms in other threads.
539
+ # Tolerate 15 and 30 ms because of the bad resolution
540
+ # of the clock on Windows (around 15.6 ms).
538
541
min_time = 0.015
542
+ max_time = 0.030
539
543
busy_time = 0.100
540
544
541
545
# thread_time() should include CPU time spent in current thread...
@@ -550,7 +554,7 @@ def test_thread_time(self):
550
554
t .start ()
551
555
t .join ()
552
556
stop = time .thread_time ()
553
- self .assertLess (stop - start , min_time )
557
+ self .assertLess (stop - start , max_time )
554
558
555
559
info = time .get_clock_info ('thread_time' )
556
560
self .assertTrue (info .monotonic )
You can’t perform that action at this time.
0 commit comments