-
Notifications
You must be signed in to change notification settings - Fork 140
Commit 531da78
make time measurements monotonic (#231)
- `time.time()` is the system time. "it's great" (tm)
however it is not reliable for measuring time spent.
it gives you the "current" time, but oh... time can move backwards
(thanks NTP).
- `time.monotonic()` is a monotonic time source. "it's great" (tm)
it only goes forward, making measurements a peach.
however it cannot be used as a reference point.1 parent 8e99918 commit 531da78
2 files changed
+10
-5
lines changedLines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 | - | ||
61 | + | ||
62 | + | ||
63 | + | ||
62 | 64 |
| |
63 | 65 |
| |
64 | 66 |
| |
| |||
72 | 74 |
| |
73 | 75 |
| |
74 | 76 |
| |
75 | - | ||
77 | + | ||
76 | 78 |
| |
77 | 79 |
| |
78 | 80 |
| |
79 | 81 |
| |
80 | 82 |
| |
83 | + | ||
84 | + | ||
85 | + | ||
81 | 86 |
| |
82 | 87 |
| |
83 | 88 |
| |
| |||
120 | 125 |
| |
121 | 126 |
| |
122 | 127 |
| |
123 | - | ||
128 | + | ||
124 | 129 |
| |
125 | 130 |
| |
126 | 131 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 | - | ||
65 | + | ||
66 | 66 |
| |
67 | - | ||
67 | + | ||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
|
0 commit comments