Thanks Rupert. Up till now I'd only used the "let in" syntax to calculate 
simple values rather than define local functions.

Good news I tested my implementation manually by reducing the value 
returned by my token expiry time check by 35990000 milliseconds. At that 
level the system would try to redo the authorisation every 10 seconds or so.

I got to wondering if the Process.sleep function would pause if a laptop is 
put to sleep, and tried that - no problems. Discussion here about it in JS 
(I'm assuming Process.Sleep is using setTimeout) 
: 
http://stackoverflow.com/questions/6346849/what-happens-to-settimeout-when-the-computer-goes-to-sleep

While I don't want to go back to checking every second I'm thinking it 
might be wise to institute an additional process to check the token 
validity on a set cycle in case the other process gets munted. Not sure 
whether that would be best to be longer or shorter than the regular token 
validity time. I think mine is 10 hours.

-- 
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