mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 09:51:48 +02:00
(v1.5.0.9021) improve speed of %like%
This commit is contained in:
@ -1077,6 +1077,14 @@ percentage <- function(x, digits = NULL, ...) {
|
||||
digits = digits, ...)
|
||||
}
|
||||
|
||||
time_start_tracking <- function() {
|
||||
pkg_env$time_start <- round(as.numeric(Sys.time()) * 1000)
|
||||
}
|
||||
|
||||
time_track <- function(name = NULL) {
|
||||
paste("(until now:", trimws(round(as.numeric(Sys.time()) * 1000) - pkg_env$time_start), "ms)")
|
||||
}
|
||||
|
||||
# prevent dependency on package 'backports'
|
||||
# these functions were not available in previous versions of R (last checked: R 4.0.3)
|
||||
# see here for the full list: https://github.com/r-lib/backports
|
||||
|
Reference in New Issue
Block a user