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{})
| 1655 | // |
| 1656 | // a.WithinDuration(time.Now(), time.Now(), 10*time.Second) |
| 1657 | func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) { |
| 1658 | if h, ok := a.t.(tHelper); ok { |
| 1659 | h.Helper() |
| 1660 | } |
| 1661 | WithinDuration(a.t, expected, actual, delta, msgAndArgs...) |
| 1662 | } |
| 1663 | |
| 1664 | // WithinDurationf asserts that the two times are within duration delta of each other. |
| 1665 | // |