You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
215 B
14 lines
215 B
1 year ago
|
package timex
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
var initTime = time.Now().AddDate(-1, -1, -1)
|
||
|
|
||
|
func Now() time.Duration {
|
||
|
return time.Since(initTime)
|
||
|
}
|
||
|
|
||
|
func Since(d time.Duration) time.Duration {
|
||
|
return time.Since(initTime) - d
|
||
|
}
|