epochtime

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2018 License: AGPL-3.0 Imports: 1 Imported by: 16

Documentation

Overview

Package epochtime implements Katzenpost epoch related timekeeping functions.

Index

Constants

View Source
const Period = 3 * time.Hour

Period is the duration of a Katzenpost epoch.

Variables

View Source
var Epoch = time.Date(2017, 6, 1, 0, 0, 0, 0, time.UTC)

Epoch is the Katzenpost epoch expressed in UTC.

Functions

func FromUnix

func FromUnix(t int64) (current uint64, elapsed, till time.Duration)

FromUnix returns the Katzenpost epoch, time since the start of the current epoch, and time till the next epoch relative to a Unix time in seconds.

func IsInEpoch

func IsInEpoch(e uint64, t uint64) bool

IsInEpoch returns true iff the epoch e contains the time t, measured in the number of seconds since the UNIX epoch.

func Now

func Now() (current uint64, elapsed, till time.Duration)

Now returns the current Katzenpost epoch, time since the start of the current epoch, and time till the next epoch.

Types

This section is empty.

Jump to

Keyboard shortcuts

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