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

Add Timestamp.get_time and improve Timestamp.seconds_since_unix_epoch #111

Merged
merged 3 commits into from
Sep 18, 2023

Conversation

JEnoch
Copy link
Member

@JEnoch JEnoch commented Sep 15, 2023

  1. Add a Timestampl.get_time property returning the time part as a NTP64 (int).
  2. Make Timestamp.seconds_since_unix_epoch rely on new uhlc 0.6.3 NTP64.as_secs_f64() (Add NTP64::as_secs_f64() atolab/uhlc-rs#13), and improve its doc.

@JEnoch JEnoch requested a review from p-avital September 15, 2023 15:09
@JEnoch JEnoch changed the title Improve Timestamp.seconds_since_unix_epoch() Add Timestamp.get_time and improve Timestamp.seconds_since_unix_epoch Sep 18, 2023
Copy link
Contributor

@p-avital p-avital left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can return plain values rather than results here, since the operations are infallible and switching to a result later will not be a breaking change since the errors are forwarded as exceptions

src/value.rs Outdated Show resolved Hide resolved
@JEnoch JEnoch merged commit 75ac29b into master Sep 18, 2023
8 checks passed
@JEnoch JEnoch deleted the seconds_since_unix_epoch branch September 18, 2023 10:05
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.

3 participants