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

Mark session.uhlc as internal #1427

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions zenoh/src/api/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ use std::{
};

use tracing::{error, info, trace, warn};
use uhlc::{Timestamp, HLC};
use uhlc::Timestamp;
#[cfg(feature = "internal")]
use uhlc::HLC;
use zenoh_buffers::ZBuf;
use zenoh_collections::SingleOrVec;
use zenoh_config::{unwrap_or_default, wrappers::ZenohId, Config, Notifier};
Expand Down Expand Up @@ -553,6 +555,7 @@ impl Session {
self.info().zid().wait()
}

#[cfg(feature = "internal")]
pub fn hlc(&self) -> Option<&HLC> {
self.0.runtime.hlc()
}
Expand Down Expand Up @@ -666,7 +669,7 @@ impl Session {
/// # }
/// ```
pub fn new_timestamp(&self) -> Timestamp {
match self.hlc() {
match self.0.runtime.hlc() {
Some(hlc) => hlc.new_timestamp(),
None => {
// Called in the case that the runtime is not initialized with an hlc
Expand Down
Loading