ptp

package
v0.0.0-...-163e08f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDelayRequest

func NewDelayRequest(sequenceId uint16) *ptp.DelReqMsg

Types

type MeasurementResult

type MeasurementResult struct {
	Delay              time.Duration
	Offset             time.Duration
	ServerToClientDiff time.Duration
	ClientToServerDiff time.Duration
	Timestamp          time.Time
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(clock *VirtualClock) *Server

func (*Server) Serve

func (s *Server) Serve()

type VirtualClock

type VirtualClock struct {
	// contains filtered or unexported fields
}

func NewVirtualClock

func NewVirtualClock(delay int64) *VirtualClock

func (*VirtualClock) Now

func (v *VirtualClock) Now() time.Time

func (*VirtualClock) Offset

func (v *VirtualClock) Offset(diff time.Duration)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL