MCPcopy Create free account
hub / github.com/cloudflare/cfssl / roughlySameTime

Function roughlySameTime

certdb/sql/sql_test.go:47–50  ·  view source on GitHub ↗

roughlySameTime decides if t1 and t2 are close enough.

(t1, t2 time.Time)

Source from the content-addressed store, hash-verified

45
46// roughlySameTime decides if t1 and t2 are close enough.
47func roughlySameTime(t1, t2 time.Time) bool {
48 // return true if the difference is smaller than 1 sec.
49 return math.Abs(float64(t1.Sub(t2))) < float64(time.Second)
50}
51
52func testEverything(ta TestAccessor, t *testing.T) {
53 testInsertCertificateAndGetCertificate(ta, t)

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…