why does SysTime use hecto-nanoseconds?
The base unit of Phobos' SysTime is 1 hnsec = 100 nanoseconds, rather than 1 second like the Unix epoch, or 1 nanosecond as in POSIX's timespec struct.
Steven Schveighoffer explains:
However,
Duration
andSysTime
are stored in hnsecs for a very specific reason -- range. Simply put, if you have a 64-bit integer, and you picked nanoseconds as the unit, you can store only 585 years of range. 10 ns gives you 5850 years, and 100 ns gives you 58k years. That should be good enough for all but the most esoteric calculations (given that a Duration is signed, this gives a range of roughly -29k years to 29k years).Note also that hnsecs is the base unit for Windows high precision clocks, though their epoch is year 1600 instead of year 0.