linux: ignore fractional time in uv_uptime()

Before this commit, uv_uptime() returned the nanoseconds as the
fractional part of the uptime.  It's a bit inconsistent with the
output on other platforms because those only return whole seconds
(with the possible exception of Windows.)

This commit changes linux-core.c to only return whole seconds.
This commit is contained in:
Ben Noordhuis 2013-10-08 23:16:01 +02:00
parent a1e159f04e
commit 556fe1a659

View File

@ -368,7 +368,6 @@ int uv_uptime(double* uptime) {
return -errno;
*uptime = now.tv_sec;
*uptime += (double)now.tv_nsec / 1000000000.0;
return 0;
}