rtptime

package
v0.0.0-...-d9e956b Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package rtptime manipulates RTP and NTP time

Index

Constants

View Source
const JiffiesPerSec = 24576000

JiffiesPerSec is the number of jiffies in a second. This is the LCM of 48000, 96000 and 65536.

Variables

This section is empty.

Functions

func FromDuration

func FromDuration(d time.Duration, hz uint32) int64

FromDuration converts a time.Duration into units of 1/hz.

func Jiffies

func Jiffies() uint64

Jiffies returns the current time in jiffies.

func Microseconds

func Microseconds() uint64

Microseconds is like Now, but uses microseconds.

func NTPToTime

func NTPToTime(ntp uint64) time.Time

NTPToTime converts an NTP time into a time.Time.

func Now

func Now(hz uint32) uint64

Now returns the current time in units of 1/hz from an arbitrary origin.

func TimeToJiffies

func TimeToJiffies(tm time.Time) uint64

TimeToJiffies converts a time.Time into jiffies.

func TimeToNTP

func TimeToNTP(tm time.Time) uint64

TimeToNTP converts a time.Time into an NTP time.

func ToDuration

func ToDuration(tm int64, hz uint32) time.Duration

ToDuration converts units of 1/hz into a time.Duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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