From f794ea95eb49a4f92ddd16307d70f6cad0f6a768 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Thu, 21 Apr 2022 14:39:49 +0200 Subject: Discovery: Rollback preventions and hourly updates for servers --- src/util.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/util.go') 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() +} -- cgit v1.2.3