Process.cancel_timer

You're seeing just the function cancel_timer, go back to Process module for more information.
Link to this function

cancel_timer(timer_ref, options \\ [])

View Source

Specs

cancel_timer(reference(), options) :: non_neg_integer() | false | :ok
when options: [async: boolean(), info: boolean()]

Cancels a timer returned by send_after/3.

When the result is an integer, it represents the time in milliseconds left until the timer would have expired.

When the result is false, a timer corresponding to timer_ref could not be found. This can happen either because the timer expired, because it has already been canceled, or because timer_ref never corresponded to a timer.

Even if the timer had expired and the message was sent, this function does not tell you if the timeout message has arrived at its destination yet.

Inlined by the compiler.

Options

  • :async - (boolean) when false, the request for cancellation is synchronous. When true, the request for cancellation is asynchronous, meaning that the request to cancel the timer is issued and :ok is returned right away. Defaults to false.

  • :info - (boolean) whether to return information about the timer being cancelled. When the :async option is false and :info is true, then either an integer or false (like described above) is returned. If :async is false and :info is false, :ok is returned. If :async is true and :info is true, a message in the form {:cancel_timer, timer_ref, result} (where result is an integer or false like described above) is sent to the caller of this function when the cancellation has been performed. If :async is true and :info is false, no message is sent. Defaults to true.