Copyright © (C) 2011, Torben Hoffmann
Behaviours: gen_server.
Authors: Torben Hoffmann (torben.lehoff@gmail.com).
args() = [term()]
callback() = {module(), function_name(), args()}
function_name() = atom()
server_name() = atom() | pid()
-type server_ref() :: server_name() | pid().
state() = #chronos_state{running = [{timer_name(), reference(), callback()}]}
timer_duration() = non_neg_integer()
timer_name() = term()
| code_change/3 | |
| handle_call/3 | |
| handle_cast/2 | |
| handle_info/2 | |
| init/1 | |
| start_link/0 | |
| start_link/1 | |
| start_timer/4 | |
| stop/1 | |
| stop_timer/2 | |
| terminate/2 |
code_change(OldVsn, State, Extra) -> any()
handle_call(X1::term(), From::term(), State::state()) -> {reply, ok | {error, term()}, state()} | {stop, term(), ok, state()}
handle_cast(Msg, State) -> any()
handle_info(X1, Chronos_state) -> any()
init(Args::[]) -> {ok, state()} | {stop, term()} | ignore
start_link() -> {ok, pid()} | ignore | {error, term()}
start_link(ServerName::server_name()) -> {ok, pid()} | ignore | {error, term()}
start_timer(ServerName::server_name(), TimerName::timer_name(), Timeout::non_neg_integer(), Callback::callback()) -> ok | {error, term()}
stop(ServerName::server_name()) -> ok
stop_timer(ServerName::server_name(), TimerName::timer_name()) -> {ok, non_neg_integer()} | not_running | {error, term()}
terminate(Reason, Chronos_state) -> any()
Generated by EDoc