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