time

package
v0.0.0-...-7d2fe1b Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DecimalPrecision = 2

Variables

This section is empty.

Functions

This section is empty.

Types

type EventTime

type EventTime struct {
	FrameDuration time.Duration

	Start, End           Time
	StartFrame, EndFrame int64

	Duration int64
}

func EventLineFromText

func EventLineFromText(start, end Time, text string) (t EventTime)

func NewEventTime

func NewEventTime(startFrame, duration int64, frameDuration time.Duration) (t EventTime)

func (EventTime) Encode

func (t EventTime) Encode() string

func (EventTime) GetDurationFromEndOffset

func (t EventTime) GetDurationFromEndOffset(frameOffset int64) time.Duration

func (EventTime) GetDurationFromStartOffset

func (t EventTime) GetDurationFromStartOffset(frameOffset int64) time.Duration

type Time

type Time struct {
	Total         int64
	TotalAdjusted int64

	Hours, Minutes, Seconds, Milliseconds int64

	AdjustedMilliseconds         int64
	AdjustedMillisecondPrecision int64
	AdjustedMillisecondError     int64
}

func FromString

func FromString(p string) (t Time, err error)

func NewTime

func NewTime(ms int64, roundDown bool) (t Time)

func (Time) AdjustWithError

func (t Time) AdjustWithError(ms, adjMsErr int64) Time

func (Time) Duration

func (t Time) Duration() time.Duration

func (Time) String

func (t Time) String() string

Jump to

Keyboard shortcuts

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