Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was going to comment how you should probably still account for an overflow condition by warning at 70%, beeping at 80%, refusing to take off at 85%, etc., but it turns out that even with nanosecond precision timekeeping (1e-9), a signed 64 bit integer is enough for 292 years of not rebooting.

    (2^63)/1e9/3600/24/365 = ~292
Yeah, just go for that 64-bit int and call it a day.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: