mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 08:36:59 +08:00
20 lines
278 B
Go
Executable File
20 lines
278 B
Go
Executable File
package models
|
|
|
|
import "time"
|
|
|
|
type Output struct {
|
|
Network string
|
|
Protocol string
|
|
Remote string
|
|
Segment int
|
|
Device string
|
|
RxBytes uint64
|
|
TxBytes uint64
|
|
ErrPkt uint64
|
|
NewTime int64
|
|
}
|
|
|
|
func (o *Output) UpTime() int64 {
|
|
return time.Now().Unix() - o.NewTime
|
|
}
|