aboutsummaryrefslogtreecommitdiff
path: root/tests/usage.rs
blob: 64f70501664b5b967abc50db553ebcf9c69ab6e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use archivator::{Archive, Zip};
use std::fs::File;
use std::time::{SystemTime, UNIX_EPOCH};

fn time() -> f64 {
    SystemTime::now()
        .duration_since(UNIX_EPOCH)
        .unwrap()
        .as_secs_f64()
}

#[test]
fn time_test() {
    let file = File::open("tests/files/1M.zip").unwrap();

    let start = time();
    let archive = Archive::<Zip>::new(file).unwrap();
    println!("{}", time() - start);
}