Limit update rate
This commit is contained in:
parent
61fa13974d
commit
9432869bce
2 changed files with 37 additions and 14 deletions
2
main.go
2
main.go
|
|
@ -50,6 +50,7 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
UpdateRate uint `json:"updateRate"`
|
||||
ScrollSpeed float64 `json:"scrollSpeed"`
|
||||
MoveSpeed float64 `json:"moveSpeed"`
|
||||
MouseScrollSpeed float64 `json:"mouseScrollSpeed"`
|
||||
|
|
@ -156,6 +157,7 @@ func main() {
|
|||
flag.StringVar(&secret, "secret", "", "shared secret for client authentication")
|
||||
flag.StringVar(&certFile, "cert", "", "file containing TLS certificate")
|
||||
flag.StringVar(&keyFile, "key", "", "file containing TLS private key")
|
||||
flag.UintVar(&config.UpdateRate, "update-rate", 20, "number of updates per second")
|
||||
flag.Float64Var(&config.MoveSpeed, "move-speed", 1, "move speed multiplier")
|
||||
flag.Float64Var(&config.ScrollSpeed, "scroll-speed", 1, "scroll speed multiplier")
|
||||
flag.Float64Var(&config.MouseMoveSpeed, "mouse-move-speed", 1, "mouse move speed multiplier")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue