Function seconds_to_hours_precision

Source
pub fn seconds_to_hours_precision<T: Into<f64>>(
    seconds: T,
    decimal_places: u32,
) -> f64
Expand description

Converts seconds to hours with specified decimal places precision

ยงExamples

use ddapi_rs::util::time::seconds_to_hours_precision;

assert_eq!(seconds_to_hours_precision(3661, 2), 1.02);  // 2 decimal places
assert_eq!(seconds_to_hours_precision(3661, 3), 1.017); // 3 decimal places