C API entry point to currentTime()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

C API entry point to currentTime()

Matthew Dowle


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

[hidden email] mailing list