proc.time()
This function is likely to be most useful in recording checkpoints for computations; particular expressions can be timed by computing the difference between such checkpoints. The last two columns (elapsed times for child processes) will be blank in Windows.
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