News for hackers. Stuff that matters.
Re:A Visual Journey Through Async Rust by ninkendo on Friday April 25, 2025 @10:39AM (#43794080)
It's more likely to be the unaccuracy of Instant in rust. It's guaranteed to be non-decreasing, but not steady: https://doc.rust-lang.org/std/time/struct.Instant.html

> In other words, each tick of the underlying clock might not be the same length (e.g. some seconds may be longer than others). An instant may jump forwards or experience time dilation (slow down or speed up), but it will never go backwards

Re:A Visual Journey Through Async Rust by ninkendo on Friday April 25, 2025 @07:27PM (#43799434)
Ugh, too late to edit but I’m way off. It’s just scheduling variability, if a task gets more CPU time, it plots more of them near each other, and if it gets less, they’re farther apart.

(I had originally thought the code used the duration since the start as the input to the sin function, didn’t realize it’s just plotting a pre-allocated range.)