Documentation ¶
Overview ¶
Package cdtime implements methods to convert from and to collectd's internal time representation, cdtime_t.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Time ¶
type Time uint64
Time represens a time in collectd's internal representation.
func NewDuration ¶
NewDuration returns a new Time representing duration d.
func (Time) Float ¶
Float returns the time as seocnds since epoch. This is a lossy conversion, which will lose up to 11 bits. This means that the returned value should be considered to have roughly microsecond precision.
func (Time) MarshalJSON ¶
MarshalJSON implements the "encoding/json".Marshaler interface for Time.
func (Time) String ¶
String returns the string representation of Time. The format used is seconds since the epoch with millisecond precision, e.g. "1426588900.328".
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements the "encoding/json".Unmarshaler interface for Time.