summaryrefslogtreecommitdiff
path: root/src/util.go
diff options
context:
space:
mode:
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()
+}