We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b19699 commit 408260dCopy full SHA for 408260d
bpython/repl.py
@@ -57,12 +57,13 @@
57
class RuntimeTimer(object):
58
def __init__(self):
59
self.reset_timer()
60
+ self.time = time.monotonic if hasattr(time, 'monotonic') else time.time
61
62
def __enter__(self):
- self.start = time.time()
63
+ self.start = self.time()
64
65
def __exit__(self, ty, val, tb):
- self.last_command = time.time() - self.start
66
+ self.last_command = self.time() - self.start
67
self.running_time += self.last_command
68
return False
69
0 commit comments