mark clocks with spec tag
Summary: So that if `std::chrono::steady_clock` and `folly::chrono::coarse_steady_clock` have the same spec, time points from the two clocks are compatible. The intention is to provide a generic interface to determine whether it is safe to interpret a time-point from one clock as a time-point from another clock. For example, it is safe to interpret a time-point from the coarse-steady-clock as a time-point from the steady-clock, and the code marks this by giving both clocks the same spec tag, but it is not safe to interpret a time-point from the system-clock as a time-point from the steady-clock, and the code marks this by giving the two clocks different or void spec tags. Concrete code can already do this at will. The idea is to have a generic way to do this, from within an algorithm templated over all the clock types and having no special knowledge of any clock type. Reviewed By: simpkins Differential Revision: D29222091 fbshipit-source-id: b9442acd08716a46e704b6d800cc1cd1d0583e25
Showing
Please register or sign in to comment