metrictank: github.com/grafana/metrictank/util/align Index | Files

package align

import "github.com/grafana/metrictank/util/align"

Index

Package Files

align.go

func Backward Uses

func Backward(ts uint32, interval uint32) uint32

Backward aligns the ts to the previous ts that divides by the interval, even if it is already aligned

func BackwardIfNotAligned Uses

func BackwardIfNotAligned(ts uint32, interval uint32) uint32

BackwardIfNotAligned aligns the ts to the previous ts that divides by the interval, except if it is already aligned

func Forward Uses

func Forward(ts, interval uint32) uint32

Forward aligns ts to the next timestamp that divides by the interval, even if it is already aligned

func ForwardIfNotAligned Uses

func ForwardIfNotAligned(ts, interval uint32) uint32

ForwardIfNotAligned aligns ts to the next timestamp that divides by the interval, except if it is already aligned

Package align is imported by 4 packages. Updated 2020-07-13. Refresh now. Tools for package owners.