-
Notifications
You must be signed in to change notification settings - Fork 929
[FR] Support for CLOCK_MONOTONIC_RAW for packet timestamps #1570
Copy link
Copy link
Open
Description
Would it be possible to add support for using CLOCK_MONOTONIC_RAW — or optionally all of the monotonic clock types (CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC_RAW) — so that the timestamp stored in pcap_pkthdr->ts represents the time elapsed since the system boot time, rather than the wall-clock time?
This would be useful in cases where:
- Wall-clock time can jump backwards or forwards (NTP adjustments, manual time changes),
- Monotonic timestamps are required for precise packet timing or latency measurements,
- Raw hardware time is preferred, without NTP corrections (
CLOCK_MONOTONIC_RAW).
✅ Goal:
Have packet timestamps (pcap_pkthdr->ts) generated using a monotonic clock source instead of the system clock.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels