xp

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const PauseThreshold = time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

func NewSession

func NewSession() *Session

func (*Session) AddCombat

func (s *Session) AddCombat(timestamp time.Time)

func (*Session) AddGain

func (s *Session) AddGain(timestamp time.Time, percent float64)

func (*Session) AddLevelUp

func (s *Session) AddLevelUp(timestamp time.Time)

func (*Session) AddPriorLevelProgress added in v0.2.4

func (s *Session) AddPriorLevelProgress(percent float64, known bool)

AddPriorLevelProgress supplies progress earned before the measured session. A level-up observed inside the session takes precedence over this baseline.

func (*Session) Observe

func (s *Session) Observe(logTime, observedAt time.Time)

func (*Session) SnapshotAtLatestLog

func (s *Session) SnapshotAtLatestLog() Snapshot

func (*Session) SnapshotLive

func (s *Session) SnapshotLive(now time.Time) Snapshot

type Snapshot

type Snapshot struct {
	Percent        float64
	LevelPercent   float64
	ProgressKnown  bool
	Gains          int
	ActiveDuration time.Duration
	PercentPerHour float64
}

func (Snapshot) TimeToLevel

func (s Snapshot) TimeToLevel() (time.Duration, bool)

Jump to

Keyboard shortcuts

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