R/stopwatch.R

Defines functions format.stopwatch print.stopwatch

Documented in format.stopwatch print.stopwatch

##' @rdname get_stopwatch
print.stopwatch <- function(x, ...) {
    cat(RcppSpdlog::format_stopwatch(x), "\n")
    invisible(x)
}

##' @rdname get_stopwatch
format.stopwatch <- function(x, ...) {
    xx <- RcppSpdlog::format_stopwatch(x)
    names(xx) <- names(x)
    xx
}

Try the RcppSpdlog package in your browser

Any scripts or data that you put into this service are public.

RcppSpdlog documentation built on July 26, 2023, 5:07 p.m.