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

Function Sleep

internal/util.go:37–47  ·  view source on GitHub ↗
(ctx context.Context, dur time.Duration)

Source from the content-addressed store, hash-verified

35}
36
37func Sleep(ctx context.Context, dur time.Duration) error {
38 t := time.NewTimer(dur)
39 defer t.Stop()
40
41 select {
42 case <-t.C:
43 return nil
44 case <-ctx.Done():
45 return ctx.Err()
46 }
47}
48
49func ToLower(s string) string {
50 if isLower(s) {

Callers 7

_processMethod · 0.92
processMethod · 0.92
processMethod · 0.92
processPipelineMethod · 0.92
processTxPipelineMethod · 0.92
WatchMethod · 0.92

Calls 2

StopMethod · 0.65
ErrMethod · 0.65

Tested by

no test coverage detected