Module timer

An implementation of the Erlang/OTP timer interface.

Description

This module implements a strict subset of the Erlang/OTP timer interface.

Function Index

apply_after/4Applies Module:Function(Arguments) after Time milliseconds.
send_after/2Sends Message to the calling process after Time milliseconds.
send_after/3Sends Message to Pid after Time milliseconds.
sleep/1Pauses the execution of the current process for a given number of milliseconds, or forever, using infinity as the parameter.

Function Details

apply_after/4


apply_after(Time::non_neg_integer(), Module::module(), Function::atom(), Arguments::[term()]) -> {ok, reference()}

Time: time in milliseconds after which to apply the function.
Module: the module of the function to apply.
Function: the function to apply.
Arguments: the arguments to pass to the function.

returns: {ok, TRef} where TRef is a reference to the timer.

Applies Module:Function(Arguments) after Time milliseconds.

send_after/2


send_after(Time::non_neg_integer(), Message::term()) -> {ok, reference()}

Time: time in milliseconds after which to send the message.
Message: the message to send to the calling process.

returns: {ok, TRef} where TRef is a reference to the timer.

Sends Message to the calling process after Time milliseconds.

send_after/3


send_after(Time::non_neg_integer(), Pid::pid() | atom(), Message::term()) -> {ok, reference()}

Time: time in milliseconds after which to send the message.
Pid: the process to which to send the message.
Message: the message to send.

returns: {ok, TRef} where TRef is a reference to the timer.

Sends Message to Pid after Time milliseconds.

sleep/1


sleep(Timeout::timeout()) -> ok

Timeout: number of milliseconds to sleep or infinity

returns: ok

Pauses the execution of the current process for a given number of milliseconds, or forever, using infinity as the parameter.