Created
December 7, 2016 09:33
-
-
Save mpizenberg/deadac606e56ef1da16c4c1e94cc946c to your computer and use it in GitHub Desktop.
Medium Debounce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Msg = Debounce VirtualTime | ... | |
-- create a deferred (by timeout) command taking currentVirtualTime as an argument | |
checkIfNothingHappenedIn : Time -> VirtualTime -> Cmd Msg | |
checkIfNothingHappenedIn timeout currentVirtualTime = | |
deferredCmd timeout (Debounce currentVirtualTime) | |
deferredCmd : Time -> Msg -> Cmd Msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment