@@ -85,20 +85,13 @@ def test_clock_monotonic(self):
8585 'need time.pthread_getcpuclockid()' )
8686 @unittest .skipUnless (hasattr (time , 'clock_gettime' ),
8787 'need time.clock_gettime()' )
88- @unittest .skipUnless (hasattr (time , 'CLOCK_THREAD_CPUTIME_ID' ),
89- 'need time.CLOCK_THREAD_CPUTIME_ID' )
9088 def test_pthread_getcpuclockid (self ):
9189 clk_id = time .pthread_getcpuclockid (threading .get_ident ())
9290 self .assertTrue (type (clk_id ) is int )
9391 self .assertNotEqual (clk_id , time .CLOCK_THREAD_CPUTIME_ID )
94- # This should suffice to show that both calls are measuring the same clock.
9592 t1 = time .clock_gettime (clk_id )
96- t2 = time .clock_gettime (time .CLOCK_THREAD_CPUTIME_ID )
97- t3 = time .clock_gettime (clk_id )
98- t4 = time .clock_gettime (time .CLOCK_THREAD_CPUTIME_ID )
93+ t2 = time .clock_gettime (clk_id )
9994 self .assertLessEqual (t1 , t2 )
100- self .assertLessEqual (t2 , t3 )
101- self .assertLessEqual (t3 , t4 )
10295
10396 @unittest .skipUnless (hasattr (time , 'clock_getres' ),
10497 'need time.clock_getres()' )
0 commit comments