GetTimes: Get model timing

Description Usage Arguments Value Note

Description

This function takes a start time, and different run times, and outputs the timing to a file. The purpose is to allow one to see how long different model processes take, and prioritize sections of code for optimization or for implementation in C++.

Usage

1
GetTimes(start.time, run.times, run.lbl, timefile, write.timefile, Model.Name)

Arguments

start.time

The starting time for the model run

run.times

A list of intermediate times during the model run

run.lbl

A list of labels for each of the intermediate times

timefile

The file (including path) to be created

write.timefile

An indicator for whether or not to write to file. If 0, no file will be output, if 1 only the total model time will be output, if 2 all timing will be output.

Model.Name

The model being timed

Value

Nothing is returned, function is run to create a file with run times.

Note

run.times and run.lbl need to be the same length and in the same order, or you will get corrupted/strange results!


akeyel/spatialdemography documentation built on May 12, 2019, 4:43 a.m.