mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
17 lines
247 B
Go
17 lines
247 B
Go
package sqlstore
|
|
|
|
import "time"
|
|
|
|
// TimeNow makes it possible to test usage of time
|
|
var TimeNow = time.Now
|
|
|
|
func MockTimeNow(constTime time.Time) {
|
|
TimeNow = func() time.Time {
|
|
return constTime
|
|
}
|
|
}
|
|
|
|
func ResetTimeNow() {
|
|
TimeNow = time.Now
|
|
}
|