diff options
author | Mike Crute <mike@crute.us> | 2021-11-07 18:42:15 -0800 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2021-11-07 18:42:15 -0800 |
commit | df0e9084397605e3bd10f5aedd9c2bffd6d10e90 (patch) | |
tree | 70c56ca38330a816828cd595eaeea96c923318c9 /time | |
download | golib-df0e9084397605e3bd10f5aedd9c2bffd6d10e90.tar.bz2 golib-df0e9084397605e3bd10f5aedd9c2bffd6d10e90.tar.xz golib-df0e9084397605e3bd10f5aedd9c2bffd6d10e90.zip |
Initial extraction commit
Diffstat (limited to 'time')
-rw-r--r-- | time/time.go | 14 |
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 @@ | |||
1 | package time | ||
2 | |||
3 | import ( | ||
4 | "time" | ||
5 | ) | ||
6 | |||
7 | var ( | ||
8 | Day time.Duration = 24 * time.Hour | ||
9 | Year = 365 * 24 * time.Hour | ||
10 | ) | ||
11 | |||
12 | func ToSeconds(d time.Duration) int { | ||
13 | return int(d.Seconds()) | ||
14 | } | ||