Closed twisted-trac closed 8 years ago
@glyph set status to closed |
---|
It's not clear that this even makes sense to do. time.clock
is deprecated in python 3, anyway. If python wants to make time.time
higher resolution, that's fine. But I don't see what the user-facing benefit of this would be. #2424 has a more substantive discussion of potentially cross-platform useful changes to time management within Twisted.
@exarkun commented |
---|
#!html
<pre>
Reverted to time.time, because time.clock has a period of 49 days.
A possibly way to deal with this:
class Clock:
lastValue = 0
rollOver = 0
INFINITY = 2 ** 16 - 1
def clock(self):
v = time.clock()
if v < self.lastValue - self.INFINITY:
self.rollOver += 1
v = v + self.rollOver * self.lastValue
self.lastValue = v
return v
</pre>
Searchable metadata
``` trac-id__416 416 type__enhancement enhancement reporter__itamarst itamarst priority__lowest lowest milestone__ branch__ branch_author__ status__closed closed resolution__wontfix wontfix component__core core keywords__ time__1070314169000000 1070314169000000 changetime__1477812356437945 1477812356437945 version__ owner__PenguinOfDoom PenguinOfDoom cc__exarkun cc__itamarst cc__PenguinOfDoom cc__teratorn ```