Struct naia_shared::GameInstant
source · pub struct GameInstant { /* private fields */ }Implementations§
source§impl GameInstant
impl GameInstant
pub fn new(start_instant: &Instant) -> Self
pub fn time_since(&self, previous_instant: &GameInstant) -> GameDuration
pub fn offset_from(&self, other: &GameInstant) -> i32
pub fn is_more_than(&self, other: &GameInstant) -> bool
pub fn as_millis(&self) -> u32
pub fn add_millis(&self, millis: u32) -> Self
pub fn sub_millis(&self, millis: u32) -> Self
pub fn add_signed_millis(&self, millis: i32) -> Self
Trait Implementations§
source§impl Clone for GameInstant
impl Clone for GameInstant
source§fn clone(&self) -> GameInstant
fn clone(&self) -> GameInstant
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl ConstBitLength for GameInstant
impl ConstBitLength for GameInstant
fn const_bit_length() -> u32
source§impl PartialEq<GameInstant> for GameInstant
impl PartialEq<GameInstant> for GameInstant
source§fn eq(&self, other: &GameInstant) -> bool
fn eq(&self, other: &GameInstant) -> bool
This method tests for
self and other values to be equal, and is used
by ==.