ztcl::meter reset
Sets each count of a meter to zero.
ztcl::meter reset NAME
Description
Sets each count of NAME to zero, and the start time of the next record to now. The sequence of the records goes on.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| NAME | string | required | The name of a meter. |
Returns
An empty string.
Examples
Each example of this page runs after package require ztcl::json.
% ztcl::meter create e
> ztcl::meter run e {set a 1}
> ztcl::meter record e
> ztcl::meter reset e
> list [dict get [ztcl::meter get e] units] [ztcl::json get [ztcl::meter record e] seq]
0 2
Errors
% ztcl::meter reset nope
no meter "nope"
-errorcode ZTCL METER NAME
% ztcl::meter reset
wrong # args: should be "ztcl::meter reset name"
-errorcode TCL WRONGARGS
Facts
- Capability
meter. A new interpreter does not have it until the host turns it on.- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1