Hacker News new | ask | show | jobs
by Retr0id 1011 days ago
The clock does wrap at the top though, mostly. If you watch the green/teal hand do a full rotation, the moment it hits the top, the number on the dark-purple hand will increment by 1. Same goes for every other pair of hands.

The problem is just that signed integers don't wrap at 0, they wrap at whatever their min/max point is - which, hopefully, my clock helps convey, along with the accompanying text. I think flipping it 180 degrees would make it less consistent overall. Maybe I'll add some more words to the blog post, heh

1 comments

Something I could do is add 0x8000_0000 to the number that I'm displaying. Then the final wrap point is at 0, when the small hand points up. I'll have a think about this, and I may well do it, but it slightly goes against my goal of visualizing the signed 32-bit integer representation of unix time - I'd be visualizing a different number! (as an unsigned int)