pub fn new(tick_interval: Duration, minimum_latency_duration: Option<Duration>) -> Self {
        let minimum_latency = {
            if let Some(min_latency) = minimum_latency_duration {
                min_latency.as_millis() as f32
            } else {
                0.0
            }
        };

        let tick_interval_millis = tick_interval.as_millis() as f32;

        TickManager {
            tick_interval_millis,
            tick_interval_seconds: tick_interval.as_nanos() as f32 / 1000000000.0,
            server_tick: 1,
            client_tick_adjust: 0,
            server_tick_adjust: 0,
            server_tick_running_diff: 0,
            last_tick_instant: Instant::now(),
            accumulator: 0.0,
            fraction: 0.0,
            minimum_latency,
        }
    }
/// Create a new TickManager with a given tick interval duration
Create a new TickManager with a given tick interval duration
Create a new TickManager with a given tick interval duration
pub fn new(tick_interval: Duration, minimum_latency_duration: Option<Duration>) -> Self {
        let minimum_latency = {
            if let Some(min_latency) = minimum_latency_duration {
                min_latency.as_millis() as f32
            } else {
                0.0
            }
        };
        let tick_interval_millis = tick_interval.as_millis() as f32;
        TickManager {
            tick_interval_millis,
            tick_interval_seconds: tick_interval.as_nanos() as f32 / 1000000000.0,
            server_tick: 1,
            client_tick_adjust: 0,
            server_tick_adjust: 0,
            server_tick_running_diff: 0,
            last_tick_instant: Instant::now(),
            accumulator: 0.0,
            fraction: 0.0,
            minimum_latency,
        }
    }
pub fn new ( tick_interval : Duration , minimum_latency_duration : Option < Duration > ) -> Self { let minimum_latency = { if let Some ( min_latency ) = minimum_latency_duration { min_latency . as_millis ( ) as f32 } else { 0.0 } } ; let tick_interval_millis = tick_interval . as_millis ( ) as f32 ; TickManager { tick_interval_millis , tick_interval_seconds : tick_interval . as_nanos ( ) as f32 / 1000000000.0 , server_tick : 1 , client_tick_adjust : 0 , server_tick_adjust : 0 , server_tick_running_diff : 0 , last_tick_instant : Instant :: now ( ) , accumulator : 0.0 , fraction : 0.0 , minimum_latency , } }
Create a new TickManager with a given tick interval duration
Create a new TickManager with a given tick interval duration
tick_interval
Duration
minimum_latency_duration
Option<Duration>
tick_interval
Duration
minimum_latency_duration
Option<Duration>