Module

System.Metrics.Counter

Package
purescript-metrics
Repository
abhin4v/purescript-metrics

#Counter Source

data Counter :: Type

A mutable, integer valued counter.

#new Source

new :: forall eff. Eff (ref :: REF | eff) Counter

Creates a new counter with zero value.

#read Source

read :: forall eff. Counter -> Eff (ref :: REF | eff) Int

Returns the current value of the counter.

#reset Source

reset :: forall eff. Counter -> Eff (ref :: REF | eff) Unit

Resets the counter value to zero.

#inc Source

inc :: forall eff. Counter -> Int -> Eff (ref :: REF | eff) Unit

Increments the counter value by the given count.