summaryrefslogtreecommitdiffhomepage
path: root/src/tai64.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/tai64.go')
-rw-r--r--src/tai64.go5
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
+}