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

Method WithinDurationf

internal/testify/assert/assertion_forward.go:1564–1569  ·  view source on GitHub ↗

WithinDurationf asserts that the two times are within duration delta of each other. a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")

(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

1562//
1563// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
1564func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool {
1565 if h, ok := a.t.(tHelper); ok {
1566 h.Helper()
1567 }
1568 return WithinDurationf(a.t, expected, actual, delta, msg, args...)
1569}
1570
1571// WithinRange asserts that a time is within a time range (inclusive).
1572//

Callers

nothing calls this directly

Calls 2

WithinDurationfFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected