WithinDuration asserts that the two times are within duration delta of each other. a.WithinDuration(time.Now(), time.Now(), 10*time.Second)
(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{})
| 1554 | // |
| 1555 | // a.WithinDuration(time.Now(), time.Now(), 10*time.Second) |
| 1556 | func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) { |
| 1557 | if h, ok := a.t.(tHelper); ok { |
| 1558 | h.Helper() |
| 1559 | } |
| 1560 | WithinDuration(a.t, expected, actual, delta, msgAndArgs...) |
| 1561 | } |
| 1562 | |
| 1563 | // WithinDurationf asserts that the two times are within duration delta of each other. |
| 1564 | // |