diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h index 91f5cdbdc..35f508de7 100644 --- a/include/zenoh_commons.h +++ b/include/zenoh_commons.h @@ -530,7 +530,7 @@ typedef struct z_get_options_t { enum z_query_target_t target; struct z_query_consolidation_t consolidation; struct z_value_t value; - uint64_t timeout; + uint64_t timeout_ms; } z_get_options_t; /** * An borrowed array of borrowed, zenoh allocated, NULL terminated strings. diff --git a/src/get.rs b/src/get.rs index df505afd1..d0706bed2 100644 --- a/src/get.rs +++ b/src/get.rs @@ -164,14 +164,14 @@ pub struct z_get_options_t { pub target: z_query_target_t, pub consolidation: z_query_consolidation_t, pub value: z_value_t, - pub timeout: u64, + pub timeout_ms: u64, } #[no_mangle] pub extern "C" fn z_get_options_default() -> z_get_options_t { z_get_options_t { target: QueryTarget::default().into(), consolidation: QueryConsolidation::default().into(), - timeout: 0, + timeout_ms: 0, value: { z_value_t { payload: z_bytes_t::empty(), @@ -221,8 +221,8 @@ pub unsafe extern "C" fn z_get( .consolidation(options.consolidation) .target(options.target.into()) .with_value(&options.value); - if options.timeout != 0 { - q = q.timeout(std::time::Duration::from_millis(options.timeout)); + if options.timeout_ms != 0 { + q = q.timeout(std::time::Duration::from_millis(options.timeout_ms)); } } match q