time_wrap: Time Two Expressions

View source: R/tmbutils.R

time_wrapR Documentation

Time Two Expressions

Description

Evaluate two expressions in the environment in which time_wrap is called, and record the system time associated with each expression.

Usage

time_wrap(expr1, expr2, units = "secs")

Arguments

expr1

first expression

expr2

second expression

units

time units with which to measure the system time of each expression (see difftime)

Value

list with three components: (1) time to evaluate the first expression, (2) time to evaluate the second expression, and (3) the time for the first expression divided by the time for the second

See Also

Other compare: compare_grads(), compare_sims()


bbolker/McMasterPandemic documentation built on Aug. 25, 2024, 6:35 p.m.