github.com/criyle/go-sandbox@v0.10.3/runner/limit.go (about)

     1  package runner
     2  
     3  import (
     4  	"fmt"
     5  	"time"
     6  )
     7  
     8  // Limit represents the resource limit for traced process
     9  type Limit struct {
    10  	TimeLimit   time.Duration // user CPU time limit (in ns)
    11  	MemoryLimit Size          // user memory limit (in bytes)
    12  }
    13  
    14  func (l Limit) String() string {
    15  	return fmt.Sprintf("Limit[Time=%v, Memory=%v]", l.TimeLimit, l.MemoryLimit)
    16  }