summaryrefslogtreecommitdiff
path: root/src/util.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-21 14:39:49 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-21 14:39:49 +0200
commitf794ea95eb49a4f92ddd16307d70f6cad0f6a768 (patch)
tree5eb56dcda154375eedc2478055cfe07d0b4b7686 /src/util.go
parent7c284019f1e48ddd37b0f047b50564f069caf379 (diff)
Discovery: Rollback preventions and hourly updates for servers
Diffstat (limited to 'src/util.go')
-rw-r--r--src/util.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.go b/src/util.go
index 1d0df91..87340f9 100644
--- a/src/util.go
+++ b/src/util.go
@@ -2,6 +2,7 @@ package eduvpn
import (
"crypto/rand"
+ "time"
)
// Creates a random byteslice of `size`
@@ -13,3 +14,8 @@ func MakeRandomByteSlice(size int) ([]byte, error) {
}
return byteSlice, nil
}
+
+func GenerateTimeSeconds() int64 {
+ current := time.Now()
+ return current.Unix()
+}