msys.counter.add

March 26, 2020 Contributors

Name

msys.counter.add — Add to the current value of the specified counter

Synopsis

msys.counter.add(object_or_path, delta);

object_or_path: mixed
delta: number

Description

The first argument is either a path to a counter (for example, /sites/site_name/errors) or a counter object that was returned by msys.counter.open. If a string is provided containing the path to a counter that does not exist, the counter is created with STRICT semantics. The second argument is atomically added to the current value of the counter.

Enable this function with the statement require('msys.counter');.

For a code example see “msys.counter.read example”.

See Also

msys.counter.reset, msys.counter.inc, msys.counter.open, msys.counter.unlink, counter