[issue14428] Implementation of the PEP 418

STINNER Victor report at bugs.python.org
Wed May 30 13:35:39 CEST 2012

STINNER Victor <victor.stinner at gmail.com> added the comment:

> It really looks like seconds to me, definitely not jiffies ;-)

time.process_time() uses maybe "seconds" on Linux, but it doesn't include time elapsed during sleep. See the test:

    def test_process_time(self):
        start = time.process_time()
        stop = time.process_time()
        self.assertLess(stop - start, 0.01)

According to Wikipedia: "Since 1967, the second has been defined to be: the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium 133 atom."

The caesium 133 atom is not sleeping while your process is sleeping, so you cannot say the time.process_time() uses second. Do you see what I mean?


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list