Page MenuHomeFreeBSD

ping: Replace gettimeofday() with clock_gettime(CLOCK_MONOTONIC)
ClosedPublic

Authored by jansucan on Aug 13 2019, 8:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 11:26 PM
Unknown Object (File)
Sat, Sep 20, 4:03 PM
Unknown Object (File)
Sep 13 2025, 10:38 PM
Unknown Object (File)
Aug 31 2025, 8:55 PM
Unknown Object (File)
Aug 2 2025, 1:13 AM
Unknown Object (File)
Jul 26 2025, 2:02 PM
Unknown Object (File)
Jul 6 2025, 5:26 PM
Unknown Object (File)
Jun 28 2025, 6:48 AM
Subscribers

Details

Summary

Replace gettimeofday() with clock_gettime(CLOCK_MONOTONIC)

Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

asomers requested changes to this revision.Aug 13 2019, 3:07 PM
asomers added inline comments.
sbin/ping/ping.c
896 ↗(On Diff #60717)

These 10 lines can be replaced by timespecadd

This revision now requires changes to proceed.Aug 13 2019, 3:07 PM

Use timespecadd(), and timespecsub().

sbin/ping/ping.c
896 ↗(On Diff #60717)

Fixed.

This revision is now accepted and ready to land.Aug 13 2019, 7:24 PM
This revision was automatically updated to reflect the committed changes.