Skip to content

Commit

Permalink
Fix tock to always convert difftime to secs. Previous implementation …
Browse files Browse the repository at this point in the history
…was misleading if the difftime was >60s
  • Loading branch information
rfriedman22 committed May 29, 2024
1 parent b182cb5 commit 8379894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ tock <- function() {
t0 <- get_global_variable('monocle3_timer_t0')
msg <- get_global_variable('monocle3_timer_msg')
if(length(msg) > 0) {
message(sprintf('%s %.2f seconds.',msg, t1 - t0))
message(sprintf('%s %.2f seconds.',msg, difftime(t1, t0, units = "secs")))
}
else {
return(t1 - t0)
Expand Down

0 comments on commit 8379894

Please sign in to comment.