4 ms·
I thought unsigned in 64 bits, holding the number of nanoseconds since the Unix 0 time (which might be 1970, but i forget).
by jjtheblunt 7y ago
I thought unsigned in 64 bits, holding the number of nanoseconds since the Unix 0 time (which might be 1970, but i forget).
- saagarjha 7y agotime_t is usually signed.
- masklinn 7y agoUNIX time is seconds since epoch (hence year 2038, that's the limit for a signed 32b time_t). gettimeofday() and clock_gettime() provide higher resolution timestamps (respectively µs and ns), using typedefs instead of just numbers. Some APIs return floating-point UNIX time in order to provide sub-second accuracy (the decimal part is the fractional second). Python's time.time() does that for instance.
- theclaw 7y agoIt’s a signed type so dates before 1970 can be represented