use std::io;

use runtime::rt as yggdrasil_rt;
use yggdrasil_rt::time::{self, ClockType, SystemTime as RawSystemTime};

pub fn set_real_time(seconds: u64, nanoseconds: u32) -> io::Result<()> {
    let raw = RawSystemTime::new(seconds, nanoseconds as u64);
    time::set_clock(ClockType::RealTime, raw)?;
    Ok(())
}
