shared

package
v0.0.0-...-6db7017 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RepeatableChance

func RepeatableChance(t time.Time, chance float32) bool

RepeatableChance is an idempotent call based on a time and a chance in the range (1, 0) it will return true if the result of a fast hash of the time is above a certain percentage (chance) of possible hash values

func RepeatableOption

func RepeatableOption(t time.Time, options int) int

RepeatableOption is an idempotent call based on a time and a number of options If the result of a fast hash of the time is within a certain option-range of possible hash values, it will return that option

Types

type TimeSpan

type TimeSpan struct {
	StartTime time.Time
	EndTime   time.Time
}

TimeSpan is represents anything that starts and Ends

func (TimeSpan) End

func (s TimeSpan) End() time.Time

End returns the End time

func (TimeSpan) Start

func (s TimeSpan) Start() time.Time

Start returns the Start time

Jump to

Keyboard shortcuts

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