A fake clock useful for testing timing.
| 34 | |
| 35 | // A fake clock useful for testing timing. |
| 36 | type MockClock struct { |
| 37 | mutex sync.Mutex |
| 38 | wakeups tHeap |
| 39 | now time.Time |
| 40 | logFunc func(format string, args ...interface{}) |
| 41 | } |
| 42 | |
| 43 | func NewMockClock(now time.Time) *MockClock { |
| 44 | c := &MockClock{} |
nothing calls this directly
no outgoing calls
no test coverage detected