aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-09-07 12:00:42 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-09-07 12:00:42 +0200
commitaa3b01dd78ef2f9174152e58bd75a3b3d9de79b3 (patch)
tree51b99cbec098ff2a5d5f18b6b6f08b07ac1baa3f /cmd
parent36810d344b000de50a1d4fbba53587a72f68bcae (diff)
PollInterval
Diffstat (limited to 'cmd')
-rw-r--r--cmd/poll/main.go2
-rw-r--r--cmd/runcmd/main.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/poll/main.go b/cmd/poll/main.go
index 6e2dd10..95be209 100644
--- a/cmd/poll/main.go
+++ b/cmd/poll/main.go
@@ -14,7 +14,7 @@ func main() {
}
defer dev.Close()
- for state := range redbutton.Poll(dev) {
+ for state := range redbutton.Poll(dev, redbutton.PollInterval) {
fmt.Println(state)
}
}
diff --git a/cmd/runcmd/main.go b/cmd/runcmd/main.go
index e01bb04..7832742 100644
--- a/cmd/runcmd/main.go
+++ b/cmd/runcmd/main.go
@@ -54,7 +54,7 @@ func main() {
}
defer dev.Close()
- state := redbutton.Poll(dev)
+ state := redbutton.Poll(dev, redbutton.PollInterval)
for stateFn := Init; stateFn != nil; {
stateFn = stateFn(<-state)
}