MCPcopy Index your code
hub / github.com/bootdotdev/bootdev / handleSleep

Function handleSleep

checks/runner.go:164–170  ·  view source on GitHub ↗
(s api.Sleepable, ch chan tea.Msg)

Source from the content-addressed store, hash-verified

162}
163
164func handleSleep(s api.Sleepable, ch chan tea.Msg) {
165 sleepMs := s.GetSleepAfterMs()
166 if sleepMs != nil && *sleepMs > 0 {
167 ch <- messages.SleepMsg{DurationMs: *sleepMs}
168 time.Sleep(time.Duration(*sleepMs) * time.Millisecond)
169 }
170}

Callers 1

CLIChecksFunction · 0.85

Calls 1

GetSleepAfterMsMethod · 0.65

Tested by

no test coverage detected