On Wednesday, November 9, 2016 at 10:18:39 AM UTC, Rupert Smith wrote:
>
> On Tuesday, November 8, 2016 at 8:09:25 PM UTC, Max Goldstein wrote:
>>
>> Could you run Time.now andThen calculate the amount of time left until 
>> expiry, then Process.sleep until then?
>
>
> Yes, I think this is how it needs to be done:
>
> Run Time.now to produce a Msg, say 'SetupRefresh'
>
> In the update handler for 'SetupRefresh' calculate the delay needed as 
> (expiryTime - now), then use Process.sleep andThen invokeRefresh, where 
> invokeRefresh is my Task for invoking the refresh call.
>

Or can I chain Time.now andThen Process.sleep andThen invokeRefresh 
together without needing to issue a Cmd and have and update handler for the 
intermediate steps? I'll look into that. 

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to