Get the latest tech news

How to Think About Time in Programming


Personal website of Shan Rauf.

While the seconds-from-epoch model is a useful way to talk about durations and instants, humans don't generally say "Wanna grab lunch at 1,748,718,000 seconds from the Unix epoch?" For example, if your program only handles datetimes from 1970 - 2038, Unix time can represent them using 32-bit integers (so you potentially reduce memory and CPU usage by keeping the representation to 32 bits). The International Earth Rotation and Reference Systems Service (IERS) tracks the current UTC time by averaging hundreds of atomic clocks globally.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Time

Time

Photo of programming

programming

Related news:

News photo

Samsung officially debuts Exynos 2500 SoC just in time for its Unpacked reveals

News photo

Ocarina of Time Randomizer

News photo

Revil ransomware members released after time served on carding charges