MCPcopy
hub / github.com/redis/go-redis / usePrecise

Function usePrecise

commands.go:25–27  ·  view source on GitHub ↗
(dur time.Duration)

Source from the content-addressed store, hash-verified

23const KeepTTL = -1
24
25func usePrecise(dur time.Duration) bool {
26 return dur < time.Second || dur%time.Second != 0
27}
28
29func formatMs(ctx context.Context, dur time.Duration) int64 {
30 if dur > 0 && dur < time.Millisecond {

Callers 13

GetExMethod · 0.85
SetMethod · 0.85
SetArgsMethod · 0.85
SetNXMethod · 0.85
SetXXMethod · 0.85
SetIFEQMethod · 0.85
SetIFEQGetMethod · 0.85
SetIFNEMethod · 0.85
SetIFNEGetMethod · 0.85
SetIFDEQMethod · 0.85
SetIFDEQGetMethod · 0.85
SetIFDNEMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected