Skip to content

Conversation

plrigaux
Copy link
Contributor

@plrigaux plrigaux commented Feb 20, 2025

Hello,

This is a great crate, but I need a function that I want to share.

I created the function pub fn timestamp_usec(&self) -> Result on JournalRef struct. It the same than the timestamp, but it gives a direct access to the realtime_usec u64 value.

I also made a test to ensure that both functions "timestamp_usec" and "timestamp" return the same.

Thank you

PS
Without this function I can still get the u64 value with the help of workarounds ;)

@codyps codyps enabled auto-merge July 17, 2025 04:59
@codyps codyps force-pushed the timestamp_u64 branch 4 times, most recently from d8134ec to 83f17fc Compare July 17, 2025 06:01
@codyps codyps changed the title New function timestamp_u64 New function timestamp_usec Jul 17, 2025
@codyps
Copy link
Owner

codyps commented Jul 17, 2025

Sorry about changing around the name, I wanted to communicate the units of the return value in the name of the function. I considered micros as an alternate suffix, but stuck with the usec suffix for now.

Thanks for the PR.

@codyps codyps merged commit 6180da7 into codyps:master Jul 17, 2025
5 checks passed
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