Module chronos

.

Copyright © (C) 2011, Torben Hoffmann

Behaviours: gen_server.

Authors: Torben Hoffmann (torben.lehoff@gmail.com).

Description

Data Types

args()

args() = [term()]

callback()

callback() = {module(), function_name(), args()}

function_name()

function_name() = atom()

server_name()

server_name() = atom() | pid()

-type server_ref() :: server_name() | pid().

state()

state() = #chronos_state{running = [{timer_name(), reference(), callback()}]}

timer_duration()

timer_duration() = non_neg_integer()

timer_name()

timer_name() = term()

Function Index

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

Function Details

code_change/3

code_change(OldVsn, State, Extra) -> any()

handle_call/3

handle_call(X1::term(), From::term(), State::state()) -> {reply, ok | {error, term()}, state()} | {stop, term(), ok, state()}

handle_cast/2

handle_cast(Msg, State) -> any()

handle_info/2

handle_info(X1, Chronos_state) -> any()

init/1

init(Args::[]) -> {ok, state()} | {stop, term()} | ignore

start_link/0

start_link() -> {ok, pid()} | ignore | {error, term()}

start_link/1

start_link(ServerName::server_name()) -> {ok, pid()} | ignore | {error, term()}

start_timer/4

start_timer(ServerName::server_name(), TimerName::timer_name(), Timeout::non_neg_integer(), Callback::callback()) -> ok | {error, term()}

stop/1

stop(ServerName::server_name()) -> ok

stop_timer/2

stop_timer(ServerName::server_name(), TimerName::timer_name()) -> {ok, non_neg_integer()} | not_running | {error, term()}

terminate/2

terminate(Reason, Chronos_state) -> any()


Generated by EDoc