Skip to content

Commit

Permalink
Add --interval option
Browse files Browse the repository at this point in the history
  • Loading branch information
brutella committed Dec 27, 2018
1 parent 48a8afe commit 28bf424
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/hkuvr.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func main() {
var (
clientId = flag.Int("client_id", 16, "id of the client; range from [1...254]")
serverId = flag.Int("server_id", 1, "id of the server to which the client connects to: range from [1...254]")
interval = flag.Int("interval", 10, "update interval in seconds")
dataDir = flag.String("data_dir", "data", "Path to data directory")
)
flag.Parse()
Expand Down Expand Up @@ -77,7 +78,7 @@ func main() {
updateObjectValues(objects)

// 5.
<-time.After(time.Second * 10)
<-time.After(time.Second * time.Duration(*interval))
}
}()

Expand Down

0 comments on commit 28bf424

Please sign in to comment.