SetTestDeadlockProtection - с параметром

Этот коммит содержится в:
Softonik 2025-07-19 13:13:46 +03:00
родитель fe103371e1
коммит df19a9120a

Просмотреть файл

@ -45,8 +45,8 @@ func Atof(in string) float64 {
return res return res
} }
func SetTestDeadlockProtection() { func SetTestDeadlockProtection(seconds int) {
go checkTestTimeout(1 * time.Second) go checkTestTimeout(time.Duration(seconds) * time.Second)
} }
func checkTestTimeout(t time.Duration) { func checkTestTimeout(t time.Duration) {
<-time.After(t) <-time.After(t)