From mdowle at mdowle.plus.com  Tue Mar 26 15:49:54 2013
From: mdowle at mdowle.plus.com (Matthew Dowle)
Date: Tue, 26 Mar 2013 14:49:54 +0000
Subject: [Rd] C API entry point to currentTime()
Message-ID: <e0e1f8874fca4a3ecb16712fe2043119@imap.plus.net>


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



[Rd] C API entry point to currentTime()
Matthew Dowle