Skip to content

Commit

Permalink
R<4.3.0 needs time origin
Browse files Browse the repository at this point in the history
  • Loading branch information
mschubert committed Sep 10, 2023
1 parent c86745a commit 3a35111
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/pool.r
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ Pool = R6::R6Class("Pool",
rt = proc.time() - private$timer
if (! inherits(wt, "proc_time"))
wt = rep(NA, 3)
rt3_fmt = difftime(rt[[3]], 0, units="auto")
rt3_fmt = difftime(as.POSIXct(rt[[3]], origin="1970-01-01"),
as.POSIXct(0, origin="1970-01-01"), units="auto")
rt3_str = sprintf("%.1f %s", rt3_fmt, attr(rt3_fmt, "units"))

fmt = "Master: [%s %.1f%% CPU]; Worker: [avg %.1f%% CPU, max %s]"
Expand Down

0 comments on commit 3a35111

Please sign in to comment.