3 ms·
High-precision date/time in C
- theamk 1y ago> Time is a pair (seconds, nanoseconds), I expect something diffferent, but isn't this just timespec_t[0] with different epoch? It's been in in POSIX since 2001. The upside of timespec_t is it uses regular Unix epoch for seconds time, so thre is no need for things like "time_get_year", you use regular time_t APIs for that. [0] https://man7.org/linux/man-pages/man3/timespec.3type.html https://man7.org/linux/man-pages/man3/timespec.3type.html