summaryrefslogtreecommitdiff
path: root/timers.go
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-25 15:30:09 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-25 15:30:09 -0400
commit5b858632acb672c1f38145edac9df11fdbcacad6 (patch)
treeb7fedecabd9ffa73776ebc5648e538ad84dad789 /timers.go
parentd765300de5b2786e236b4aea8a61e32faf4ba605 (diff)
Use proto3 again.
Diffstat (limited to 'timers.go')
-rw-r--r--timers.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/timers.go b/timers.go
index 91aaf1806..cfe0f0544 100644
--- a/timers.go
+++ b/timers.go
@@ -22,19 +22,19 @@ func InitTimers() {
switch msg.Payload.(type) {
case *Msg_TimerStart:
payload := msg.GetTimerStart()
- timers[*payload.Id] = &Timer{
- Id: *payload.Id,
+ timers[payload.Id] = &Timer{
+ Id: payload.Id,
Done: false,
- Interval: *payload.Interval,
- Duration: *payload.Duration,
+ Interval: payload.Interval,
+ Duration: payload.Duration,
Cleared: false,
}
- timers[*payload.Id].StartTimer()
+ timers[payload.Id].StartTimer()
return nil
case *Msg_TimerClear:
payload := msg.GetTimerClear()
// TODO maybe need mutex here.
- timer := timers[*payload.Id]
+ timer := timers[payload.Id]
timer.Clear()
return nil
default:
@@ -64,8 +64,8 @@ func (t *Timer) StartTimer() {
PubMsg("timers", &Msg{
Payload: &Msg_TimerReady{
TimerReady: &TimerReadyMsg{
- Id: &t.Id,
- Done: &t.Done,
+ Id: t.Id,
+ Done: t.Done,
},
},
})