aboutsummaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2021-11-07 18:42:15 -0800
committerMike Crute <mike@crute.us>2021-11-07 18:42:15 -0800
commitdf0e9084397605e3bd10f5aedd9c2bffd6d10e90 (patch)
tree70c56ca38330a816828cd595eaeea96c923318c9 /time
downloadgolib-df0e9084397605e3bd10f5aedd9c2bffd6d10e90.tar.bz2
golib-df0e9084397605e3bd10f5aedd9c2bffd6d10e90.tar.xz
golib-df0e9084397605e3bd10f5aedd9c2bffd6d10e90.zip
Initial extraction commit
Diffstat (limited to 'time')
-rw-r--r--time/time.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/time/time.go b/time/time.go
new file mode 100644
index 0000000..0f8578a
--- /dev/null
+++ b/time/time.go
@@ -0,0 +1,14 @@
1package time
2
3import (
4 "time"
5)
6
7var (
8 Day time.Duration = 24 * time.Hour
9 Year = 365 * 24 * time.Hour
10)
11
12func ToSeconds(d time.Duration) int {
13 return int(d.Seconds())
14}