R/progress.R

Defines functions create_progress_process

Documented in create_progress_process

#' Create progress process
#'
#' @param timesteps Simulation timesteps
#'
#' @return Progress bar process function
create_progress_process <- function(timesteps){
  pb <- progress::progress_bar$new(
    format = "  running [:bar] :percent eta: :eta",
    total = timesteps, clear = FALSE, width= 60)
  
  function(timestep) {
    pb$tick()
  }
}
mrc-ide/malariasimulation documentation built on Oct. 14, 2024, 7:33 p.m.