5 ms·
Not all solutions are going with just 64 bits worth of seconds, although 64 bit time_t will certainly sort out the Epochalypse. ext4 moved some time ago to 30
by lambdaone 1y ago
Not all solutions are going with just 64 bits worth of seconds, although 64 bit time_t will certainly sort out the Epochalypse.
ext4 moved some time ago to 30 bits of fractional resolution (on the order of nanoseconds) and 34 bits of seconds resolution. It punts the problem 400 years or so into the future. I'm sure we will eventually settle on 128-bit timestamps with 64 bits of seconds and 64 bits of fractional resolution, and that should sort things for forseeable human history.
- jmclnx 1y agoThanks, I was wondering about ext4 and time stamps. I wonder what the zfs/btrfs type file systems do. I am a bit lazy to check but I expect btrfs is using 64 bit. zfs, I would not be surprised if it matches zfs (edit meant ext4 here).
- XorNot 1y agoA quick glance at ZFS shows it uses a uint64_t time field in nanoseconds in some places. So 580 years or so till problems (but probably patchable ones? I believe the on disk format is already 2x uint64s, this is just the gethrtime() function I saw).
- RedShift1 1y agoWhat is the use of such high precision file timestamps?
- zokier 1y agonanoseconds is just common sub-second unit that is used. notably it is used internally in linux kernel and exposed via clock_gettime (and related functions) via timespec struct https://man7.org/linux/man-pages/man3/timespec.3type.html https://man7.org/linux/man-pages/man3/timespec.3type.html it is convenient unit because 10^9 fits neatly into 32 bit integer, and it is unlikely that anyone would need more precision than that for any general purpose use.
- delta_p_delta_x 1y ago> 64 bits of seconds That is roughly 585 billion years[1]. [1]: https://www.wolframalpha.com/input?i=how+many+years+is+2%5E64+seconds https://www.wolframalpha.com/input?i=how+many+years+is+2%5E6...
- MrJohz 1y agoWhich could still cause problems if we set the epoch time to ~570 billion years before the Big Bang.
- badc0ffee 1y ago64 bits of fractional resolution? No way, gotta use 144 bits so we can get close to Planck time.