[erlang-questions] how to reply message using erlang timer module

Palanikumar Gopalakrishnan palani@REDACTED
Sat Sep 23 11:50:10 CEST 2017


Hi Guys,

             I want  to send  message to the front-end via websocket in
particular time interval.
So i use timer module for this purpose.
 *timer:apply_interval(1000, self(), <<"How' you doin'?">>),*


But it returns the following error





*15:18:20.558 [error] CRASH REPORT Process <0.570.0> with 0 neighbours
crashed with reason: call to undefined function timer:apply_interval(6000,
<0.570.0>, <<"How' you doin'?">>)15:18:20.558 [error] Ranch listener
my_cowboy_ws_server terminated with reason: call to undefined function
timer:apply_interval(6000, <0.570.0>, <<"How' you doin'?">>)*
Its there any way to solve this problem.

I already tried with



*erlang:start_timer(60000, self(), <<"How' you doin'?">>)*
Its only send message after particular timer. I didn't found method in this
module to send message in particular interval.










-- 

*Warm Regards,*

*Palanikumar Gopalakrishnan *[image: ✌]
*Developer*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170923/8e1e6833/attachment.htm>


More information about the erlang-questions mailing list