How to perform actions periodically with Erlang's gen_server?

前端 未结 4 799
伪装坚强ぢ
伪装坚强ぢ 2020-12-23 20:32

I want to start a gen_server that additionally, will perform one action every minute.

What is the best way to schedule that?

4条回答
  •  不思量自难忘°
    2020-12-23 20:58

    There is also the timer module, which could be used.

    http://erldocs.com/R14B02/stdlib/timer.html?i=8&search=timer#cancel_timer/1

提交回复
热议问题