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

Function WithinDurationf

internal/testify/require/require.go:1983–1991  ·  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

1981//
1982// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
1983func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) {
1984 if h, ok := t.(tHelper); ok {
1985 h.Helper()
1986 }
1987 if assert.WithinDurationf(t, expected, actual, delta, msg, args...) {
1988 return
1989 }
1990 t.FailNow()
1991}
1992
1993// WithinRange asserts that a time is within a time range (inclusive).
1994//

Callers 1

WithinDurationfMethod · 0.70

Calls 3

WithinDurationfFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…