add.timepoint: Adding timepoints

Description Usage Arguments Examples

View source: R/easytimingr.R

Description

Adds a named timepoint to object

Usage

1
2
3
4
add.timepoint(object, name, scripttime)

## S3 method for class 'RuntimeC'
add.timepoint(object, name, scripttime)

Arguments

object

RuntimeC-class object

name

Name of time point

scripttime

Time for one script, given by "proc.time() - proc.time()"

Examples

1
2
3
4
5
6
7
8
9
library(basicscriptsGG)
rt_object <- RuntimeC()
rt_object <- add.timepoint(rt_object, "useless", proc.time()-proc.time())	# add new timepoint (with zero time)
t1 <- proc.time()
Sys.sleep(1)		# someFunction
t2 <- proc.time()
rt_object <- add.timepoint(rt_object, "someFunction", t2-t1)	# add new timepoint (with zero time)
rt_object <- add.timepoint(rt_object, "someFunction", t2-t1)	# add new timepoint (with zero time)
rt_object <- add.timepoint(rt_object, "someFunction", t2-t1)	# add new timepoint (with zero time)

gugl58/basicscriptsGG-Package documentation built on May 17, 2019, 9:08 a.m.