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

Function WithinDurationf

internal/testify/assert/assertion_format.go:784–789  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

782//
783// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
784func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool {
785 if h, ok := t.(tHelper); ok {
786 h.Helper()
787 }
788 return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...)
789}
790
791// WithinRangef asserts that a time is within a time range (inclusive).
792//

Callers 2

WithinDurationfFunction · 0.92
WithinDurationfMethod · 0.70

Calls 2

WithinDurationFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…