The monotonic origin bound measures the clock, not the machine
This commit is contained in:
parent
7db5ec1885
commit
1c49b8c610
@ -19,10 +19,15 @@
|
||||
(println (>= t2 t1)))
|
||||
|
||||
;; And the origin is the first read rather than boot, so the first readings
|
||||
;; a program takes are small. Bounded rather than pinned: the number is
|
||||
;; whatever this process spent between the calls above and this one, which
|
||||
;; is not a second on any machine that can run the suite at all.
|
||||
(println (< (monotonic-ns) ns-per-second))
|
||||
;; a program takes are small. Bounded rather than pinned, and the bound is
|
||||
;; deliberately loose: what separates this clock from a boot-relative one is
|
||||
;; hours, so a minute proves it and a second only proved it on hardware. The
|
||||
;; tighter bound was a reading after all — memcheck runs this program on a
|
||||
;; synthetic CPU tens of times slower than the metal, the second genuinely
|
||||
;; elapsed, and the line went false under a tool that has nothing to say
|
||||
;; about clocks. A minute is past anything a simulator adds and still short
|
||||
;; of the smallest thing the assertion is meant to catch.
|
||||
(println (< (monotonic-ns) (* 60 ns-per-second)))
|
||||
|
||||
;; The f64 face is the i64 one divided, and what is checked is that the two
|
||||
;; describe the same instant: a later reading in seconds is at or past an
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user