pub fn f32_to_duration(t: f32) -> time::Duration {
    debug_assert!(t > 0.0, "f64_to_duration passed a negative number!");
    let seconds = t.trunc();
    let nanos = t.fract() * 1e9;
    time::Duration::new(seconds as u64, nanos as u32)
}
/// A convenience function to create a Rust `Duration` type
/// from a (less precise but more useful) `f32`.
///
/// Only handles positive numbers correctly.
A convenience function to create a Rust `Duration` type
from a (less precise but more useful) `f32`.

Only handles positive numbers correctly.
A convenience function to create a Rust ` Duration ` type from a ( less precise but more useful ) ` f32 ` . Only handles positive numbers correctly .
pub fn f32_to_duration(t: f32) -> time::Duration {
    debug_assert!(t > 0.0, "f64_to_duration passed a negative number!");
    let seconds = t.trunc();
    let nanos = t.fract() * 1e9;
    time::Duration::new(seconds as u64, nanos as u32)
}
pub fn f32_to_duration ( t : f32 ) -> time :: Duration { debug_assert ! ( t 0.0 " " ) ; let seconds = t . trunc ( ) ; let nanos = t . fract ( ) * 1e9 ; time :: Duration :: new ( seconds as u64 , nanos as u32 ) }
A convenience function to create a Rust `Duration` type
from a (less precise but more useful) `f32`.
A convenience function to create a Rust ` Duration ` type from a ( less precise but more useful ) ` f32 ` .
t
f32
t
f32