MCPcopy Create free account
hub / github.com/devld/go-drive / cleanPeriod

Function cleanPeriod

script/pool.go:80–89  ·  view source on GitHub ↗
(idleTime time.Duration)

Source from the content-addressed store, hash-verified

78}
79
80func cleanPeriod(idleTime time.Duration) time.Duration {
81 period := idleTime / 2
82 if period <= 0 {
83 period = time.Millisecond
84 }
85 if period > time.Minute {
86 period = time.Minute
87 }
88 return period
89}
90
91func (p *VMPool) Get(ctx context.Context) (*VM, error) {
92 for {

Callers 1

NewVMPoolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected