Last month, we released nanotime, a package to work with nanosecond timestamps. See the initial release announcement for some background material and a few first examples.
nanotime relies on the RcppCCTZ package for high(er) resolution time parsing and formatting: R itself stops a little short of a microsecond. And it uses the bit64 package for the actual arithmetic: time at this granularity is commonly represented at (integer) increments (at nanosecond resolution) relative to an offset, for which the standard epoch of Januar 1, 1970 is used. int64
types are a perfect match here, and bit64 gives us an integer64
. Naysayers will point out some technical limitations with R's S3 classes, but it works pretty much as needed here.
The one thing we did not have was Windows support. RcppCCTZ and the CCTZ library it uses need real C++11 support, and the g++-4.9
compiler used on Windows falls a little short lacking inter alia a suitable std::get_time()
implementation. Enter Dan Dillon who ported this from LLVM's libc++ which lead to Sunday's RcppCCTZ 0.2.0 release.
And now we have all our ducks in a row: everything works on Windows too. The next paragraph summarizes the changes for both this release as well as the initial one last month:
Changes in version 0.1.0 (2017-01-10)
Added Windows support thanks to expanded RcppCCTZ (closes #6)
Added "mocked up" demo with nanosecond delay networking analysis
Added 'fmt' and 'tz' options to output functions, expanded
format.nanotime
(closing #2 and #3)Added data.frame support
Expanded tests
Changes in version 0.0.1 (2016-12-15)
Initial CRAN upload.
Package is functional and provides examples.
We also have a diff to the previous version thanks to CRANberries. More details and examples are at the nanotime page; code, issue tickets etc at the GitHub repository.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.