MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / waitForCooldown

Function waitForCooldown

sdk/cliproxy/auth/conductor.go:3481–3493  ·  view source on GitHub ↗
(ctx context.Context, wait time.Duration)

Source from the content-addressed store, hash-verified

3479}
3480
3481func waitForCooldown(ctx context.Context, wait time.Duration) error {
3482 if wait <= 0 {
3483 return nil
3484 }
3485 timer := time.NewTimer(wait)
3486 defer timer.Stop()
3487 select {
3488 case <-ctx.Done():
3489 return ctx.Err()
3490 case <-timer.C:
3491 return nil
3492 }
3493}
3494
3495// MarkResult records an execution result and notifies hooks.
3496func (m *Manager) MarkResult(ctx context.Context, result Result) {

Callers 3

ExecuteMethod · 0.85
ExecuteCountMethod · 0.85
ExecuteStreamMethod · 0.85

Calls 1

StopMethod · 0.65

Tested by

no test coverage detected