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

steady_clock should be used for measuring intervals #47

Closed
danielhochman opened this issue Apr 13, 2017 · 2 comments
Closed

steady_clock should be used for measuring intervals #47

danielhochman opened this issue Apr 13, 2017 · 2 comments
Assignees

Comments

@danielhochman
Copy link

steady_clock cannot go backwards. the system_clock can move with NTP, leap second, etc. durations observed by comparing timestamps from the system_clock will be incorrect if they span a system clock change.

in reality the library will need to use both clocks. start_timestamp should come from the system_clock and duration_micros should be measured using steady_clock.

typedef std::chrono::system_clock Clock;

@jmacd
Copy link
Member

jmacd commented Apr 18, 2017

Acknowledged. I'll follow up.

@jmacd
Copy link
Member

jmacd commented Apr 19, 2017

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

No branches or pull requests

2 participants