mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
misc: updated dependencies
This commit is contained in:
parent
63810a5192
commit
34db9e5978
174 changed files with 32222 additions and 6989 deletions
11
vendor/github.com/mdlayher/raw/timeval.go
generated
vendored
11
vendor/github.com/mdlayher/raw/timeval.go
generated
vendored
|
@ -1,19 +1,20 @@
|
|||
// +build !darwin,!arm,!windows,!mipsle,!mips
|
||||
// +build !darwin,!arm,!windows,!mipsle,!mips,!386
|
||||
|
||||
package raw
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// newTimeval transforms a duration into a syscall.Timeval struct.
|
||||
// newTimeval transforms a duration into a unix.Timeval struct.
|
||||
// An error is returned in case of zero time value.
|
||||
func newTimeval(timeout time.Duration) (*syscall.Timeval, error) {
|
||||
func newTimeval(timeout time.Duration) (*unix.Timeval, error) {
|
||||
if timeout < time.Microsecond {
|
||||
return nil, &timeoutError{}
|
||||
}
|
||||
return &syscall.Timeval{
|
||||
return &unix.Timeval{
|
||||
Sec: int64(timeout / time.Second),
|
||||
Usec: int64(timeout % time.Second / time.Microsecond),
|
||||
}, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue