in reply to $BASETIME (^T) inaccurate?
$^T returns PL_basetime, which is obtained using the C code time(&PL_basetime) executed at startup.
time returns the value returned by the C code time(NULL)
So $^T - time is based on two readings of the clock obtained using time, which we know accurately returns the system time.
On Linux, Unix::Uptime->uptime uses /proc/uptime.
I don't know how this is calculated. If it's based on a counter counting ticks or similar, it wouldn't be based on the clock. Such an approach would result in a different amount than a difference in clock times if the clock is adjusted between the readings.
Updated to add more.
|
|---|