From bca4b5c87fd1aae2fdcb78b605181393a0caf9d9 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen
Date: Tue, 7 Feb 2017 22:38:36 +0100
Subject: Implement erlang:start_timer opts
---
lib/stdlib/doc/src/gen_statem.xml | 75 ++++++++++++++++++++++++++++-----------
1 file changed, 55 insertions(+), 20 deletions(-)
(limited to 'lib/stdlib/doc')
diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml
index f7baaad5d1..44ac1ad8ad 100644
--- a/lib/stdlib/doc/src/gen_statem.xml
+++ b/lib/stdlib/doc/src/gen_statem.xml
@@ -785,28 +785,38 @@ handle_event(_, _, State, Data) ->
- Generates an event of
+ Starts a timer set by
+ enter_action()
+ timeout.
+ When the timer expires an event of
event_type()
- timeout
- after this time (in milliseconds) unless another
- event arrives or has arrived
- in which case this time-out is cancelled.
+ timeout will be generated.
+ See
+ erlang:start_timer/4
+ for how Time and
+ Options
+ are interpreted. All Options of erlang:start_timer/4
+ will not necessarily be supported in the future.
+
+
+ Any event that arrives cancels this time-out.
Note that a retried or inserted event counts as arrived.
So does a state time-out zero event, if it was generated
- before this timer is requested.
+ before this time-out is requested.
- If the value is infinity, no timer is started, as
- it never would trigger anyway.
+ If Time is infinity,
+ no timer is started, as it never would expire anyway.
- If the value is 0 no timer is actually started,
+ If Time is relative and 0
+ no timer is actually started,
instead the the time-out event is enqueued to ensure
that it gets processed before any not yet
received external event.
- Note that it is not possible or needed to cancel this time-out,
+ Note that it is not possible nor needed to cancel this time-out,
as it is cancelled automatically by any other event.
@@ -815,19 +825,26 @@ handle_event(_, _, State, Data) ->
- Generates an event of
+ Starts a timer set by
+ enter_action()
+ state_timeout.
+ When the timer expires an event of
event_type()
- state_timeout
- after this time (in milliseconds) unless the gen_statem
- changes states (NewState =/= OldState)
- which case this time-out is cancelled.
+ state_timeout will be generated.
+ See
+ erlang:start_timer/4
+ for how Time and
+ Options
+ are interpreted. All Options of erlang:start_timer/4
+ will not necessarily be supported in the future.
- If the value is infinity, no timer is started, as
- it never would trigger anyway.
+ If Time is infinity,
+ no timer is started, as it never would expire anyway.
- If the value is 0 no timer is actually started,
+ If Time is relative and 0
+ no timer is actually started,
instead the the time-out event is enqueued to ensure
that it gets processed before any not yet
received external event.
@@ -839,6 +856,20 @@ handle_event(_, _, State, Data) ->
+
+
+
+
+ If Abs is true an absolute timer is started,
+ and if it false a relative, which is the default.
+ See
+ erlang:start_timer/4
+ for details.
+
+
+
+
+
@@ -954,7 +985,9 @@ handle_event(_, _, State, Data) ->
Sets the
transition_option()
event_timeout()
- to Time with EventContent.
+ to Time with EventContent
+ and options
+ Options.
state_timeout
@@ -963,7 +996,9 @@ handle_event(_, _, State, Data) ->
Sets the
transition_option()
state_timeout()
- to Time with EventContent.
+ to Time with EventContent
+ and options
+ Options.
--
cgit v1.2.3