reportTime: Report time

Description Usage Arguments Details Examples

View source: R/utilities_soundgen.R

Description

Internal soudgen function.

Usage

1
reportTime(i, nIter, time_start, jobs = NULL)

Arguments

i

current iteration

nIter

total number of iterations

time_start

time when the loop started running

jobs

vector of length nIter specifying the relative difficulty of each iteration. If not NULL, estimated time left takes into account whether the jobs ahead will take more or less time than the jobs already completed

Details

Based on the current iteration, total number of iterations, and time when the loop started running, prints estimated time left or a summary upon completion.

Examples

1
2
3
4
5
6
7
8
## Not run: 
time_start = proc.time()
for (i in 1:5) {
  Sys.sleep(i ^ 2 / 10)
  reportTime(i = i, nIter = 5, time_start = time_start, jobs = (1:5) ^ 2 / 10)
}

## End(Not run)

tatters/soundgen_beta documentation built on May 14, 2019, 9 a.m.