pub fn before_update(&mut self) {
        self.current = Instant::now();

        let mut elapsed = self.current.sub(self.previous).as_secs_f64();

        if elapsed > self.max_frame_time {
            elapsed = self.max_frame_time
        }

        self.last_frame_time = elapsed;
        self.accumulated_time += elapsed;
    }
/// Call this at the beginning of each game loop iteration.
Call this at the beginning of each game loop iteration.
Call this at the beginning of each game loop iteration .
pub fn before_update(&mut self) {
        self.current = Instant::now();
        let mut elapsed = self.current.sub(self.previous).as_secs_f64();
        if elapsed > self.max_frame_time {
            elapsed = self.max_frame_time
        }
        self.last_frame_time = elapsed;
        self.accumulated_time += elapsed;
    }
pub fn before_update ( & mut self ) { self . current = Instant :: now ( ) ; let mut elapsed = self . current . sub ( self . previous ) . as_secs_f64 ( ) ; if elapsed > self . max_frame_time { elapsed = self . max_frame_time } self . last_frame_time = elapsed ; self . accumulated_time += elapsed ; }
Call this at the beginning of each game loop iteration.
Call this at the beginning of each game loop iteration .
&mut self
&mut self