pub fn convert_timestamp(timestamp: f64) -> (u32, u32)
Expand description
Convert a f64 timestamp into u32 seconds and u32 microseconds.
§Arguments
timestamp
- The timestamp to convert.
§Returns
A tuple containing the converted seconds and microseconds.
§Example
use bgpkit_parser::utils::convert_timestamp;
let timestamp = 1609459200.123456;
let (seconds, microseconds) = convert_timestamp(timestamp);
assert_eq!(seconds, 1609459200);
assert_eq!(microseconds, 123456);