Skip to content

tictoc::tic.log(format = TRUE) doesn't seem to produce the expected output #14

Description

@svalvaro

I am not sure if this is a bug or is the expected behaviour, but when using the parameter fun.toc, the new format for the toc message is not registered in the tictoc::tic.log() see the example.

tic('computation_1')
toc(log = TRUE, func.toc = function(tic, toc, msg) { glue::glue("The time for {msg} is {toc - tic} seconds")} )
The time for computation_1 is 1.265 seconds

When I access the log with format = TRUE, it returns the value without the format

tictoc::tic.log(format = TRUE)
[[1]]
[1] "computation_1: 1.265 sec elapsed"

I was expecting:

tictoc::tic.log(format = TRUE)
[[1]]
[1] "The time for computation_1 is 1.265 seconds"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions