lotus_script/
time.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// Get the current delta time in seconds.
pub fn delta() -> f32 {
    unsafe { lotus_script_sys::time::delta_f64() as f32 }
}

/// Get the current delta time in seconds.
pub fn delta_f64() -> f64 {
    unsafe { lotus_script_sys::time::delta_f64() }
}

/// Get the number of ticks the script has been alive.
pub fn ticks_alive() -> u64 {
    unsafe { lotus_script_sys::time::ticks_alive() }
}