[PATCH] D25416: Add Chrono.h - std::chrono support header
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 03:42:49 PDT 2016
labath updated this revision to Diff 74971.
labath added a comment.
Summary of changes:
- Made TimePoint a template. User can specify the desired precision, but the default will be nanoseconds. I decided to go with the first proposal as there is to typedef for std::ratio<1>. If one wants to override precision, he should use the duration types (std::chrono::seconds).
- Added tests that verify that: a) result of toTimePoint can be stored in any timepoint with less-than-second precision; b) toTimeT accepts timepoints with more-than-nanosecond precisions
- use LLVM_ATTRIBUTE_ALWAYS_INLINE for the tiny wrapper functions
- move Chrono.inc files back into Chrono.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 13539 bytes
Desc: not available
More information about the llvm-commits