mirror of https://github.com/v2ray/v2ray-core
16 lines
241 B
Go
16 lines
241 B
Go
|
package policy
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"github.com/golang/protobuf/proto"
|
||
|
)
|
||
|
|
||
|
func (s *Second) Duration() time.Duration {
|
||
|
return time.Second * time.Duration(s.Value)
|
||
|
}
|
||
|
|
||
|
func (p *Policy) OverrideWith(another *Policy) {
|
||
|
proto.Merge(p, another)
|
||
|
}
|