sequentialclock

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *sequentialClock

New constructs a sequential clock.

Example
package main

import (
	"fmt"

	"github.com/inklabs/rangedb/pkg/clock/provider/sequentialclock"
)

func main() {
	// Given
	clock := sequentialclock.New()

	// When
	fmt.Println(clock.Now().Unix())
	fmt.Println(clock.Now().Unix())
	fmt.Println(clock.Now().Unix())

}
Output:

0
1
2

Types

This section is empty.

Jump to

Keyboard shortcuts

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