printers 2.3.0

Get printers and print files on unix and windows
Documentation
1
2
3
4
5
6
7
8
9
10
11
use libc::time_t;
use std::time::{Duration, SystemTime, UNIX_EPOCH};

pub fn time_t_to_system_time(value: time_t) -> Option<SystemTime> {
    if value > 0 {
        let time = UNIX_EPOCH + Duration::from_secs(value as u64);
        Some(time)
    } else {
        None
    }
}