Commit 8351e24
committed
Add
`os.clock` uses libc's `clock` which measure "user + sys" time which is
very rarely useful. This patch adds a new timer `os.monotonic` which
returns a monotonic timer. On Linux, none of the monotonic timers is
documented to do exactly what we would like: of those available,
`MONOTONIC_RAW` seems the option least likely to produce misleading
results, so we pick that.os.monotonic to expose a monotonic timer.1 parent ac822a1 commit 8351e24
1 file changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
192 | 206 | | |
193 | 207 | | |
194 | 208 | | |
| |||
409 | 423 | | |
410 | 424 | | |
411 | 425 | | |
| 426 | + | |
412 | 427 | | |
413 | 428 | | |
414 | 429 | | |
| |||
0 commit comments