aboutsummaryrefslogtreecommitdiffstats
path: root/src/timestamp.rs
blob: 52ab15454f6b664edf4ef3fd79f221943bdbdca7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub type TAI64N = [u8; 12];

pub fn zero() -> TAI64N {
    [0u8; 12]
}

pub fn now() -> TAI64N {
    [0u8; 12] // TODO, return current timestamp
}

pub fn compare(old : &TAI64N, new : &TAI64N) -> bool {
    for i in 0..12 {
        if new[i] > old[i] {
            return true;
        }
    }
    return false;
}