mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-11-04 14:49:53 +08:00
17 lines
352 B
Go
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)
|
|
}
|