An updated and simplified version of @wintvelt’s answer for Elm v0.18 is:
delay : Time.Time -> msg -> Cmd msg
delay time msg =
Process.sleep time
|> Task.perform (\_ -> msg)
with the same usage
An updated and simplified version of @wintvelt’s answer for Elm v0.18 is:
delay : Time.Time -> msg -> Cmd msg
delay time msg =
Process.sleep time
|> Task.perform (\_ -> msg)
with the same usage