NewMockClock builds a new mock clock using the current actual time as the initial time.
()
| 45 | // NewMockClock builds a new mock clock |
| 46 | // using the current actual time as the initial time. |
| 47 | func NewMockClock() *MockClock { |
| 48 | return &MockClock{ |
| 49 | now: time.Now(), |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | // Now reports the current time. |
| 54 | func (c *MockClock) Now() time.Time { |