newTimer {xegaSelectGene}R Documentation

Timer for R code chunks.

Description

newTimer sets up a timer object with two internal state variables, namely count to count the number of timer calls and tUsed to calculate the total time spent in a code block between two timer calls.

Usage

newTimer()

Details

Value

newTimer() returns a timer function.

a_timer_function() returns the used time in seconds (invisible).

a_timer_function("TimeUsed") returns the used time in seconds.

a_timer_function("Count") returns the number of executions of a timed function and/or a timed block of R-Code in seconds.

See Also

Other Performance Measurement: Counted(), Timed(), newCounter()

Examples

   a<-newTimer() 
   a(); Sys.sleep(2); a()
   a("TimeUsed")
   a("Count")

[Package xegaSelectGene version 1.0.0.0 Index]