Erlang 实现简单的定时器

版权声明:@潘广宇博客, https://blog.csdn.net/panguangyuu/article/details/89164027
-module(timerclock).
-export([timer/1]).

timer(Time) ->
    receive
    after Time ->
        io:format("aaa"),                   % 定时业务代码
        timer(Time)                         % 递归调用
    end.

猜你喜欢

转载自blog.csdn.net/panguangyuu/article/details/89164027