pub struct AeronClockCache { /* private fields */ }Implementations§
Source§impl AeronClockCache
impl AeronClockCache
Sourcepub fn new_zeroed_on_heap() -> Self
pub fn new_zeroed_on_heap() -> Self
creates zeroed struct where the underlying c struct is on the heap
Sourcepub fn new_zeroed_on_stack() -> Self
pub fn new_zeroed_on_stack() -> Self
creates zeroed struct where the underlying c struct is on the stack (Use with care)
pub fn pre_pad(&self) -> [u8; 56]
pub fn cached_epoch_time(&self) -> i64
pub fn cached_nano_time(&self) -> i64
pub fn post_pad(&self) -> [u8; 56]
Sourcepub fn aeron_clock_update_cached_time(&self, epoch_time: i64, nano_time: i64)
pub fn aeron_clock_update_cached_time(&self, epoch_time: i64, nano_time: i64)
Update the cached clock with the current epoch and nano time values.
§Parameters
-
epoch_timecurrent ms since epoch. -
nano_timecurrent ns time.
Sourcepub fn aeron_clock_update_cached_epoch_time(&self, epoch_time: i64)
pub fn aeron_clock_update_cached_epoch_time(&self, epoch_time: i64)
Update the cached clock with the current epoch time value.
§Parameters
epoch_timecurrent ms since epoch.
Sourcepub fn aeron_clock_update_cached_nano_time(&self, nano_time: i64)
pub fn aeron_clock_update_cached_nano_time(&self, nano_time: i64)
Sourcepub fn aeron_clock_cached_epoch_time(&self) -> i64
pub fn aeron_clock_cached_epoch_time(&self) -> i64
Retrieves the cached epoch time from supplied cached clock.
§Return
The current cached value for the epoch time.
Sourcepub fn aeron_clock_cached_nano_time(&self) -> i64
pub fn aeron_clock_cached_nano_time(&self) -> i64
Retrieves the cached nano time from supplied cached clock.
§Return
The current cached value for the nano time.
pub fn get_inner(&self) -> *mut aeron_clock_cache_t
Sourcepub unsafe fn get_inner_mut(&self) -> &mut aeron_clock_cache_t
pub unsafe fn get_inner_mut(&self) -> &mut aeron_clock_cache_t
Mutable access to the underlying C struct, minted from &self: nothing
prevents two live &mut at once, so the caller must ensure exclusive
access for the lifetime of the returned reference.
§Safety
No other reference (& or &mut) to the underlying struct may be
alive while the returned &mut is in use.
pub fn get_inner_ref(&self) -> &aeron_clock_cache_t
Trait Implementations§
Source§impl Clone for AeronClockCache
impl Clone for AeronClockCache
Source§fn clone(&self) -> AeronClockCache
fn clone(&self) -> AeronClockCache
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more