go-sandbox/types/limit.go
2020-02-12 03:01:37 -05:00

17 lines
352 B
Go

package types
import (
"fmt"
"time"
)
// Limit represents the resource limit for traced process
type Limit struct {
TimeLimit time.Duration // user CPU time limit (in ns)
MemoryLimit Size // user memory limit (in bytes)
}
func (l Limit) String() string {
return fmt.Sprintf("Limit[Time=%v, Memory=%v]", l.TimeLimit, l.MemoryLimit)
}