summaryrefslogtreecommitdiff
path: root/utilities/utilities_test.go
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2023-05-23 17:58:14 -0400
committerWill Hawkins <[email protected]>2023-06-21 09:12:22 -0400
commitec2ccf69d8b08abb03fa3bdb3e7e95ae1862d619 (patch)
tree6b636bdbda82db40da89a2bde213c684542850dc /utilities/utilities_test.go
parent5558f0347baaf6db066314f0eaf82d7fb552b2f7 (diff)
Major Update/Refactor to Support IETF 02
Beginning of a release candidate for support for IETF 02 tag of the responsiveness spec.
Diffstat (limited to 'utilities/utilities_test.go')
-rw-r--r--utilities/utilities_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/utilities/utilities_test.go b/utilities/utilities_test.go
index aa66f6b..9cd4ef0 100644
--- a/utilities/utilities_test.go
+++ b/utilities/utilities_test.go
@@ -116,3 +116,13 @@ func TestWaitWithContext(t *testing.T) {
wg.Wait()
}
+
+func TestPerSecondToInterval(t *testing.T) {
+ if time.Second != PerSecondToInterval(1) {
+ t.Fatalf("A number of nanoseconds is not equal to a second!")
+ }
+
+ if time.Second/2 != PerSecondToInterval(2) {
+ t.Fatalf("Something that happens twice per second should happen every 5000ns.")
+ }
+}