|
Whitebeam Template Reference Documentation
|
System Template
adjust()
Call this method to adjust the value stored in this counter. The 'adjustment' value is *added* to the value currently stored in the counter. Note that
by making the adjustment value negative you can decrement the counter.
Syntax
count = rb.counter.adjust(counterName, adjustment, maxLifeTime)
Parameters
The 'adjust' method takes 3 parameters:
Name | Type/Value | Range/Length | Description | counterName | string | | Required. The name of the counter to adjust. | adjustment | number | | Required. The number to *add* to the current value of this counter. | maxLifeTime | number | | Optional, default = 1800 Maximum time (in seconds) this variable will exist if it is not read or updated by the system. The default is 1800 (30 minutes). |
Results
The 'adjust' method returns structure:
Remarks
This method search for the named counter and adds adjustment value to the value currently stored. If the counter
does *not* exist then it is optionally created if 'initValue' is specified. The counter thus created will take the value of 'initValue'.
Example |
|
(loadtime : 88ms) |