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

expose new_timestamp function #276

Closed
milyin opened this issue Mar 10, 2024 · 3 comments
Closed

expose new_timestamp function #276

milyin opened this issue Mar 10, 2024 · 3 comments
Labels
api sync Synchronize API with other bindings release Part of the next release

Comments

@milyin
Copy link
Contributor

milyin commented Mar 10, 2024

Describe the release item

Expose this function into zenoh-c

    /// Generates a reception [`Timestamp`] with id=0x01.  
    /// This operation should be called if a timestamp is required for an incoming [`zenoh::Sample`](crate::Sample)
    /// that doesn't contain any timestamp.
    // tags{rust.new_reception_timestamp, api.timestamp.create.now}
    pub fn new_reception_timestamp() -> Timestamp {
        use std::time::{SystemTime, UNIX_EPOCH};

        let now = SystemTime::now().duration_since(UNIX_EPOCH).unwrap();
        Timestamp::new(now.into(), TimestampId::try_from([1]).unwrap())
    }
@milyin milyin added the release Part of the next release label Mar 10, 2024
@milyin milyin moved this to Backlog in Zenoh 1.0.0 release Mar 12, 2024
@milyin milyin added api sync Synchronize API with other bindings and removed release Part of the next release labels Mar 12, 2024
@milyin milyin added the release Part of the next release label May 29, 2024
@milyin
Copy link
Contributor Author

milyin commented Jun 9, 2024

Now it's new_timestamp() : eclipse-zenoh/zenoh#1091

@milyin milyin changed the title expose new_receprion_timestamp function expose new_timestamp function Jun 9, 2024
@milyin
Copy link
Contributor Author

milyin commented Jun 30, 2024

Depends on eclipse-zenoh/zenoh#1179

@DenisBiryukov91
Copy link
Contributor

Resolved by #519.

@gabrik gabrik closed this as completed Jul 16, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Zenoh 1.0.0 release Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api sync Synchronize API with other bindings release Part of the next release
Projects
Status: Done
Development

No branches or pull requests

3 participants