[Rd] C API entry point to currentTime()

Matthew Dowle mdowle at mdowle.plus.com
Tue Mar 26 15:49:54 CET 2013


Hi,

I used to use currentTime() (from /src/main/datetime.c) to time various 
sections of data.table C code in wall clock time in sub-second accuracy 
(type double), consistently across platforms. The consistency across 
platforms is a really nice feature of currentTime(). But currentTime() 
isn't part of R's API so I changed to clock() in order to pass R3 
checks. This is nicer in many ways but I'd still like to time elapsed 
wall clock time as well, since some of the operations are i/o bound.

Does R provide a C entry point to currentTime() (or equivalent) 
suitable for use by packages?  I searched r-devel archive and the 
manuals but may well have missed it.

Thanks, Matthew



More information about the R-devel mailing list