Example #1
0
 def monotonic():
     return clock_gettime(CLOCK_MONOTONIC)
Example #2
0
 def test_clock_monotonic(self):
     from __pypy__ import time
     a = time.clock_gettime(time.CLOCK_MONOTONIC)
     b = time.clock_gettime(time.CLOCK_MONOTONIC)
     assert a <= b
Example #3
0
 def high_res_time():
     return time.clock_gettime(time.CLOCK_MONOTONIC_RAW)
Example #4
0
 def test_clock_realtime(self):
     from __pypy__ import time
     res = time.clock_gettime(time.CLOCK_REALTIME)
     assert isinstance(res, float)