| Index: common/clock/timer.go
|
| diff --git a/common/clock/timer.go b/common/clock/timer.go
|
| index aa03c383dda4f710b8c1745d62fca5d645a9f1c8..950c3ca1900029b835aa219648565b7790551e60 100644
|
| --- a/common/clock/timer.go
|
| +++ b/common/clock/timer.go
|
| @@ -13,9 +13,8 @@ import (
|
| // A Timer is instantiated from a Clock instance and started via its Reset()
|
| // method.
|
| type Timer interface {
|
| - // GetC returns the underlying timer's channel, or nil if the timer is no
|
| - // running.
|
| - GetC() <-chan time.Time
|
| + // GetC returns the underlying timer's channel.
|
| + GetC() <-chan TimerResult
|
|
|
| // Reset configures the timer to expire after a specified duration.
|
| //
|
| @@ -29,3 +28,16 @@ type Timer interface {
|
| // If the timer is active, it will be stopped and this method will return true.
|
| Stop() bool
|
| }
|
| +
|
| +// TimerResult is the result fo a timer operation.
|
| +//
|
| +// If the timer operation completed successfully, the embedded time.Time will be
|
| +// set to the time when the timer triggered. If the timer was prematurely
|
| +// terminated, Err will be non-nil.
|
| +type TimerResult struct {
|
| + time.Time
|
| +
|
| + // Err, if not nil, indicates that After did not finish naturally and contains
|
| + // the reason why.
|
| + Err error
|
| +}
|
|
|