There is also proc.time()
You can use in the same way as Sys.time
but it gives you a similar result to system.time
.
ptm <- proc.time()
#your function here
proc.time() - ptm
the main difference between using
system.time({ #your function here })
is that the proc.time()
method still does execute your function instead of just measuring the time...
and by the way, I like to use system.time
with {}
inside so you can put a set of things...