

@unittest.skipUnless(hasattr(time, 'monotonic'), 'need time.monotonic')
@unittest.skipUnless(hasattr(time, 'clock_settime'), 'need time.clock_settime')
def test_monotonic_settime(self):
    t1 = time.monotonic()
    realtime = time.clock_gettime(time.CLOCK_REALTIME)
    try:
        time.clock_settime(time.CLOCK_REALTIME, (realtime - 3600))
    except PermissionError as err:
        self.skipTest(err)
    t2 = time.monotonic()
    time.clock_settime(time.CLOCK_REALTIME, realtime)
    self.assertGreaterEqual(t2, t1)

dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_time.py TimeTestCase.test_monotonic_settime/original