MCPcopy Index your code
hub / github.com/expr-lang/expr / WithinDuration

Method WithinDuration

internal/testify/require/require_forward.go:1556–1561  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

1554//
1555// a.WithinDuration(time.Now(), time.Now(), 10*time.Second)
1556func (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//

Callers 1

Calls 2

WithinDurationFunction · 0.70
HelperMethod · 0.45

Tested by 1