Revert "Don't use modules"

This reverts commit bffe99aead.
This commit is contained in:
Mathias Hall-Andersen
2018-02-12 22:29:11 +01:00
parent bffe99aead
commit ea4ea6f933
9 changed files with 23 additions and 20 deletions

View File

@@ -0,0 +1,21 @@
package tai64n
import (
"testing"
"time"
)
/* Testing the essential property of the timestamp
* as used by WireGuard.
*/
func TestMonotonic(t *testing.T) {
old := Now()
for i := 0; i < 10000; i++ {
time.Sleep(time.Nanosecond)
next := Now()
if !next.After(old) {
t.Error("TAI64N, not monotonically increasing on nano-second scale")
}
old = next
}
}