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

Use CLOCK_MONOTONIC #13

Closed
wants to merge 1 commit into from
Closed

Use CLOCK_MONOTONIC #13

wants to merge 1 commit into from

Conversation

dofmind
Copy link
Owner

@dofmind dofmind commented Oct 7, 2024

CLOCK_REALTIME reflects the current date and time, which can be adjusted by the system (e.g. NTP synchronization or manual change by the administrator).

We get the current time to measue elapsed time, so that should use CLOCK_MONOTONIC instead of CLOCK_REALTIME.

Also get_time_seconds() is removed, as it can be replaced with get_time_micros() for precision.

@coveralls
Copy link

coveralls commented Oct 7, 2024

Pull Request Test Coverage Report for Build 11209777725

Details

  • 23 of 24 (95.83%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 83.584%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/agent/agent.c 10 11 90.91%
Totals Coverage Status
Change from base Build 11209771288: 0.05%
Covered Lines: 5178
Relevant Lines: 6195

💛 - Coveralls

CLOCK_REALTIME reflects the current date and time, which can be adjusted
by the system (e.g. NTP synchronization or manual change by the
administrator).

We get the current time to measue elapsed time, so that should use
CLOCK_MONOTONIC instead of CLOCK_REALTIME.

Also get_time_seconds() is removed, as it can be replaced with
get_time_micros() for precision.

Signed-off-by: Joonyoung Shim <[email protected]>
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.

2 participants