[erlang-questions] Adding now + interval?

zxq9 zxq9@REDACTED
Wed Nov 26 21:32:28 CET 2014


Depending on what you are trying to do, it may be adequate to measure the 
result of a difference and compare the diff against some total amount, rather 
than adding to an existing timestamp and comparing.

Now = now(),
% ... some stuff
case timer:now_diff(now(), Now) > 500 of
% ...

On 2014年11月26日 水曜日 13:51:29 Roger Lipscombe wrote:
>  IntervalMs = 500,
>  Now = os:timestamp(),
>  Future = timer:now_add(Now, IntervalMs).
> 
> There is no timer:now_add/2 function, so how do I do this?




More information about the erlang-questions mailing list