diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-24 15:34:17 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-24 15:34:44 +0200 |
commit | 25190e43369a79dc77a740dc8cd28b8a9fcb235e (patch) | |
tree | b7057627e0710fe9ef40c077a204904c78bed9cc /src/tai64.go | |
parent | 521e77fd54fba275405affd790ac91f7998e4559 (diff) |
Restructuring of noise impl.
Diffstat (limited to 'src/tai64.go')
-rw-r--r-- | src/tai64.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tai64.go b/src/tai64.go index d0d1432..2299a37 100644 --- a/src/tai64.go +++ b/src/tai64.go @@ -1,6 +1,7 @@ package main import ( + "bytes" "encoding/binary" "time" ) @@ -21,3 +22,7 @@ func Timestamp() TAI64N { binary.BigEndian.PutUint32(tai64n[8:], nano) return tai64n } + +func (t1 *TAI64N) After(t2 TAI64N) bool { + return bytes.Compare(t1[:], t2[:]) > 0 +} |