Skip to content

Add tickInterval option#21

Open
jfedgar wants to merge 3 commits intomichaeljstevens:masterfrom
jfedgar:master
Open

Add tickInterval option#21
jfedgar wants to merge 3 commits intomichaeljstevens:masterfrom
jfedgar:master

Conversation

@jfedgar
Copy link

@jfedgar jfedgar commented Jul 8, 2019

Currently the getTime and getMsecs functions execute every millisecond. This can be a little overkill if you are only wanting to use a timer or stopwatch that does something every second (for example). I have added an optional prop called tickInterval that lets you set the interval manually if you want to reduce updates and function calls (it still defaults to 1ms).

If you set tickInterval to 1000, it will only update every second and therefore only call getTime and getMsecs every second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant