Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wrapper types to move from raw integers to types. #10

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

tobz
Copy link
Member

@tobz tobz commented Feb 20, 2020

Values that would previously return reference time-scaled times as u64 will now return a new type: Instant. This is not the same Instant from std::time, but provides many of the same methods, and will at least provide methods to calculate deltas, etc, that spit out std::time::Duration. As well, the type has a method for extracting the raw u64 value for manual manipulation.

This is a move towards being able to better differentiate between the timebase of the source and the reference clocks, as well as provide more natural interoperability with the std::time API.

Also cleaned up some dependencies, including avoiding an implicit dependency on metrics-core, instead moving it to be a conditional.

Values that would previously return reference time-scaled times as u64
will now return a new type: Instant.  This is not the same Instant from
std::time, but provides many of the same methods, and will at least
provide methods to calculate deltas, etc, that spit out
std::time::Duration.  As well, the type has a method for extracting the
raw u64 value for manual manipulation.

This is a move towards being able to better differentiate between the
timebase of the source and the reference clocks, as well as provide more
natural interoperability with the std::time API.

Also cleaned up some dependencies, including avoiding an implicit
dependency on metrics-core, instead moving it to be a conditional.
@tobz tobz merged commit bd5d393 into master Feb 20, 2020
@tobz tobz deleted the feature/wrapped-time branch January 3, 2021 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant