proc.time
Running Time of TIBCO Enterprise Runtime for R
Description
Returns a length 5 vector of cumulative times for the current engine
session.
Usage
proc.time()
Value
returns a numeric vector of class proc_time
giving the user, system, and elapsed times
for the currently running engine process, in units of seconds.
If any child processes are spawned during the current session, the
cumulative sums of the user and system times for them is also
returned (Note: this applies to UNIX only, because Windows does not
have child processes).
Note
This function is likely to be most useful in recording checkpoints
for computations. You can time particular expressions by computing
the difference between such checkpoints. The last two columns
(elapsed times for child processes) are blank in Windows.
References
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
The New S Language.
Wadsworth & Brooks/Cole.
See Also
Examples
now <- proc.time()[1:2] # checkpoint
random <- runif(1000) # or some other computation
speed <- proc.time()[1:2] - now # time taken for computation
now <- proc.time() # checkpoint
random <- runif(1000) # or some other computation
speed <- proc.time() - now # time taken for computation