| // NewInteger creates a new Integer StatsObject with the given name and |
| // returns a pointer to it. |
| func NewInteger(name string) *Integer { |
| node := findNodeLocked(name, true) |
| // Integer implements the StatsObject interface. |
| // Set sets the value of the object. |
| func (i *Integer) Set(value int64) { |
| i.lastUpdate = time.Now() |
| // Incr increments the value of the object. |
| func (i *Integer) Incr(delta int64) { |
| i.lastUpdate = time.Now() |
| // LastUpdate returns the time at which the object was last updated. |
| func (i *Integer) LastUpdate() time.Time { |
| // Value returns the current value of the object. |
| func (i *Integer) Value() interface{} { |