counter

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2017 License: ISC Imports: 1 Imported by: 0

Documentation

Overview

thread safe counter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter uint64

type to denote a counter that can be synchronously increments or decremented just a 64 bit unsigned integer

func (*Counter) Decrement

func (ic *Counter) Decrement() uint64

subtract 1 from a counter, returns new value

func (*Counter) Increment

func (ic *Counter) Increment() uint64

add 1 to a counter, returns new value

func (*Counter) IsZero

func (ic *Counter) IsZero() bool

check if zero

func (*Counter) Uint64

func (ic *Counter) Uint64() uint64

returns current value

Jump to

Keyboard shortcuts

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