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

Draft: Add new_timestamp to Session #1175

Merged

Conversation

Charles-Schleich
Copy link
Member

No description provided.

/// ```
pub fn new_timestamp(&self) -> Timestamp {
let id = self.runtime.zid();
// TODO: Should we make this an Result return type ?
Copy link
Member

Choose a reason for hiding this comment

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

duration_since(UNIX_EPOCH) should never fail since SystemTime is not allowed to be earlier than UNIX_EPOCH.

@Charles-Schleich Charles-Schleich changed the title Add new_timestamp to Session Draft: Add new_timestamp to Session Jun 20, 2024
@@ -15,6 +15,7 @@ use std::time::{SystemTime, UNIX_EPOCH};

use zenoh_protocol::core::{Timestamp, TimestampId};

// TODO: Shall we remove this new_timestamp in favoir of the src/api/session::Session::new_timestamp();
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, there was discussion about it, created issue #1179

@milyin milyin merged commit a6d117b into eclipse-zenoh:dev/1.0.0 Jun 21, 2024
12 checks passed
@Charles-Schleich Charles-Schleich deleted the zsl/dev/1.0.0/new_timestamp branch June 25, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants