SetCurrentTime sets the clock implementation to the specified time,
(t time.Time)
| 50 | |
| 51 | // SetCurrentTime sets the clock implementation to the specified time, |
| 52 | func SetCurrentTime(t time.Time) { |
| 53 | nowFunc = func() time.Time { |
| 54 | return t |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // Now returns current time using nowFunc |
| 59 | func Now() time.Time { |
no outgoing calls
no test coverage detected