MCPcopy
hub / github.com/rclone/rclone / naptime

Function naptime

cmd/bisync/queue.go:379–390  ·  view source on GitHub ↗
(totalWait fs.Duration)

Source from the content-addressed store, hash-verified

377}
378
379func naptime(totalWait fs.Duration) {
380 expireTime := time.Now().Add(time.Duration(totalWait))
381 fs.Logf(nil, "will retry in %v at %v", totalWait, expireTime.Format("2006-01-02 15:04:05 MST"))
382 for i := 0; time.Until(expireTime) > 0; i++ {
383 if i > 0 && i%10 == 0 {
384 fs.Infof(nil, Color(terminal.Dim, "retrying in %v..."), time.Until(expireTime).Round(1*time.Second))
385 } else {
386 fs.Debugf(nil, Color(terminal.Dim, "retrying in %v..."), time.Until(expireTime).Round(1*time.Second))
387 }
388 time.Sleep(1 * time.Second)
389 }
390}

Callers 1

retryFastCopyMethod · 0.85

Calls 6

LogfFunction · 0.92
InfofFunction · 0.92
DebugfFunction · 0.92
ColorFunction · 0.85
FormatMethod · 0.80
AddMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…