Skip to content

Commit 556fe1a

Browse files
committed
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.
1 parent a1e159f commit 556fe1a

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

src/unix/linux-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ int uv_uptime(double* uptime) {
368368
return -errno;
369369

370370
*uptime = now.tv_sec;
371-
*uptime += (double)now.tv_nsec / 1000000000.0;
372371
return 0;
373372
}
374373

0 commit comments

Comments
 (0)