A counter, counting up from zero by any amount, or back to it.
Functions
get: func() -> u64
The current count, now wide enough to never wrap.
increment: func()
Adds one to the count.
reset: func()
Sets the count back to zero.
add: func(n: u64)
Adds to the count.
subtract: func(n: u64)
Subtracts from the count, never below zero, in a 1.3 that was never released.
WIT
/// A counter, counting up from zero by any amount, or back to it.
interface counter {
/// The current count, now wide enough to never wrap.
get: func() -> u64;
/// Adds one to the count.
increment: func();
/// Sets the count back to zero.
reset: func();
/// Adds to the count.
add: func(n: u64);
/// Subtracts from the count, never below zero, in a 1.3 that was never released.
subtract: func(n: u64);
}