Be aware that the measurement will itself take more than a millisecond from an interpreted language like R.
Please see the help page for Sys.time, and its suggestion of proc.time. for(i in 1:100) print(proc.time()[3]) suggests this takes 3ms on my box. On Mon, 7 Nov 2005, Sydler, Dominik wrote: > Hi there > > I'm loking for a time-measurement to measure time-differences in > milliseconds. > On my search, I only found the following: > - package "base": Sys.time() > -> only second-accuracy > - package "R.utils": System$currentTimeMillis() > -> returns integer of milliseconds, but accuracy is only whole > seconds too. > At the moment I run every bit of code to measure 1000-times to be able > to calculate time in milliseconds... ;-) > > Has anyone a method to get milliseconds? > > Thanks for any help. > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
