Skip to content

Commit e636a82

Browse files
bors[bot]mpi3d
andauthoredJun 5, 2023
Merge #70
70: Fix LineEvent timestamp doc r=eldruin a=mpi3d Fix documentation on `LineEvent::timestamp()`. According to the Linux documentation, the timestamp is `CLOCK_MONOTONIC` by default: [gpio.h#L286](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/gpio.h#n286). Please see [#68 comment](#68 (comment)). Co-authored-by: Matthieu CHARETTE <matthieu.charette@gmail.com>
2 parents cff902f + 4deea43 commit e636a82

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Versioning](https://semver.org/spec/v2.0.0.html).
88

99
## [Unreleased]
1010

11+
- MSRV is now 1.59.0.
1112

1213
## [v0.5.1] - 2021-11-22
1314

‎src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -920,8 +920,10 @@ impl LineEvent {
920920
/// in an interrupt handler so it should be very accurate.
921921
///
922922
/// The nanosecond timestamp value should are captured
923-
/// using the `CLOCK_REALTIME` offsets in the kernel and
924-
/// should be compared against `CLOCK_REALTIME` values.
923+
/// using the `CLOCK_MONOTONIC` offsets in the kernel and
924+
/// should be compared against `CLOCK_MONOTONIC` values.
925+
/// Note that kernel versions prior to 5.7 used
926+
/// `CLOCK_REALTIME` offsets instead.
925927
pub fn timestamp(&self) -> u64 {
926928
self.0.timestamp
927929
}

0 commit comments

Comments
 (0)