diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2020-01-26 21:46:56 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2020-01-26 21:46:56 -0500 |
commit | 02003547bc96b3758355f0af0275170da1dba942 (patch) | |
tree | 0c34513ee7fc2eb0c782dbea14f25bfe0550c9dc /rrdformat/rrdbinary/types.go | |
parent | 34cfe3a3f2bdf13994a2a166e970e6b255368afb (diff) |
wip
Diffstat (limited to 'rrdformat/rrdbinary/types.go')
-rw-r--r-- | rrdformat/rrdbinary/types.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/rrdformat/rrdbinary/types.go b/rrdformat/rrdbinary/types.go index 892bb25..36e89fa 100644 --- a/rrdformat/rrdbinary/types.go +++ b/rrdformat/rrdbinary/types.go @@ -21,11 +21,12 @@ type Architecture struct { TimeAlign int } -type String string // \0-terminatd -type Float float64 // 8 bytes -type Uint uint64 // 4 or 8 bytes -type Unival uint64 // 8 bytes -type Timestamp time.time // 8, 12, or 16 bytes +type String string // \0-terminated +type Float float64 // 8 bytes +type Uint uint64 // 4 or 8 bytes +type _Int int64 // 4 or 8 bytes +type Unival uint64 // 8 bytes +type Time int64 // 4 or 8 bytes, only has second-precision func (u Unival) AsUint64() uint64 { return uint64(u) } func (u Unival) AsFloat64() float64 { return math.Float64frombits(uint64(u)) } |