summaryrefslogtreecommitdiffstats
path: root/vendor/sysinfo/tests/uptime.rs
blob: d5eae7323a84f6852b5d86bec0ed1839a2a75163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Take a look at the license at the top of the repository in the LICENSE file.

#[test]
fn test_uptime() {
    use sysinfo::SystemExt;

    if sysinfo::System::IS_SUPPORTED {
        let mut s = sysinfo::System::new();
        s.refresh_all();
        assert!(s.uptime() != 0);
    }
}