14 lines
229 B
Go
14 lines
229 B
Go
|
package temperature
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
type TemperatureReading struct {
|
||
|
Sensor string
|
||
|
Time time.Time
|
||
|
MilliDegrees int64
|
||
|
}
|
||
|
|
||
|
func (t *TemperatureReading) Degrees() float64 {
|
||
|
return float64(t.MilliDegrees) / 1000.0
|
||
|
}
|