Description
openedon Sep 6, 2019
Problem
Right now, time points and durations are represented by a pletora of types (to name a few):
int, unsigned, uint64_t, int64_t
This is undesirable, as not only is it inconsistent, but C++11 introduces the chrono header, which provides both:
std::chrono::time_point - A representation of a point in time.
std::chrono::duration - A representation of the span between two points in time.
Proposed Solution
Standardize on std::chrono types for representing durations and points in time. Use these types everywhere possible (it may not be doable in the C-API). Serialize these values to the appropriate CS types during serialization, not before.
To start, the PAL methods which return the current time should be updated to return a std::chrono type. This way, the epoch can be controlled from a central point and differing OS epochs (.NET, Win32, UNIX, etc.) can be abstracted away from the caller.
Non Goals
Will not address time representations in the public API surface of the SDK, as that's a bigger conversation.