Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
fever-ch
GitHub Repository: fever-ch/go-google-sites-proxy
Path: blob/master/utils/time.go
508 views
1
package utils
2
3
import "time"
4
5
// EpochNano returns t as a Unix time, the number of nanoseconds elapsed
6
// since January 1, 1970 UTC.
7
func EpochNano() int64 {
8
return time.Now().UnixNano()
9
}
10
11
// Epoch returns t as a Unix time, the number of seconds elapsed
12
// since January 1, 1970 UTC.
13
func Epoch() int64 {
14
return time.Now().Unix()
15
}
16
17