fix: tmp fix for clock time < cpu time (#156) (#158)
Some checks failed
Build / Goreleaser (push) Has been cancelled
Build / Upload artifacts-${{ matrix.os }}-${{ matrix.arch }} (amd64_v3, darwin) (push) Has been cancelled
Build / Upload artifacts-${{ matrix.os }}-${{ matrix.arch }} (amd64_v3, linux) (push) Has been cancelled
Build / Upload artifacts-${{ matrix.os }}-${{ matrix.arch }} (amd64_v3, windows) (push) Has been cancelled
Build / Upload artifacts-${{ matrix.os }}-${{ matrix.arch }} (arm64_v8.0, darwin) (push) Has been cancelled
Build / Upload artifacts-${{ matrix.os }}-${{ matrix.arch }} (arm64_v8.0, linux) (push) Has been cancelled
Build / Upload artifacts-${{ matrix.os }}-${{ matrix.arch }} (arm64_v8.0, windows) (push) Has been cancelled

This commit is contained in:
BoYanZh 2025-06-26 15:01:15 -04:00 committed by GitHub
parent 2b42c8bed5
commit 3a849af692
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,8 +19,8 @@ type waiter struct {
func (w *waiter) Wait(ctx context.Context, u envexec.Process) bool { func (w *waiter) Wait(ctx context.Context, u envexec.Process) bool {
clockTimeLimit := w.clockTimeLimit clockTimeLimit := w.clockTimeLimit
timeLimit := w.timeLimit timeLimit := w.timeLimit
if clockTimeLimit < w.timeLimit { if clockTimeLimit == 0 {
clockTimeLimit = w.timeLimit clockTimeLimit = timeLimit
} }
start := time.Now() start := time.Now()