summaryrefslogtreecommitdiff
path: root/internal/server/time.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/time.go')
-rw-r--r--internal/server/time.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/server/time.go b/internal/server/time.go
index 4e54ef6..7369f47 100644
--- a/internal/server/time.go
+++ b/internal/server/time.go
@@ -28,6 +28,7 @@ func RenewButtonTime(st time.Time, et time.Time) int64 {
return t.Unix()
}
+// CountdownTime returns the time when the countdown timer should be shown
func CountdownTime(st time.Time, et time.Time) int64 {
d := et.Sub(st)
@@ -44,6 +45,8 @@ func CountdownTime(st time.Time, et time.Time) int64 {
return t.Unix()
}
+// NotificationTimes returns the list when the app should
+// show a notification when the VPN is (about to) expire(d)
func NotificationTimes(st time.Time, et time.Time) []int64 {
last := []time.Duration{
time.Duration(0),