[][src]Function os_clock::cpu_clock_for_current_thread

pub fn cpu_clock_for_current_thread() -> Result<ThreadCPUClock, Error>

Get a clock for the CPU time of the current thread

use std::io;
use os_clock::{self, Clock};

let clock = os_clock::cpu_clock_for_current_thread().unwrap();
let time = clock.get_time().unwrap();