aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2012-03-26 13:40:14 +0200
committerPeter Andersson <[email protected]>2012-03-26 13:40:20 +0200
commit67ccf96bb7b430e691509a45299eeee1ca5f27c5 (patch)
tree2f0fdf2cf41e2f39d430d17413ff6d1e9b24f819 /lib/common_test/src/ct.erl
parent22c4c386fe2a8655b1c9be09a083b89e220f1120 (diff)
parent5fd16511a1240220f0126f7be51f44aa38bcce56 (diff)
downloadotp-67ccf96bb7b430e691509a45299eeee1ca5f27c5.tar.gz
otp-67ccf96bb7b430e691509a45299eeee1ca5f27c5.tar.bz2
otp-67ccf96bb7b430e691509a45299eeee1ca5f27c5.zip
Merge remote branch 'origin/peppe/common_test/otp-9988_9871.merged' into maint
* origin/peppe/common_test/otp-9988_9871.merged: Fix various problems with the user timetrap implementation Fix dialyzer reported errors Implement support for user controlled timetraps OTP-9988
Diffstat (limited to 'lib/common_test/src/ct.erl')
-rw-r--r--lib/common_test/src/ct.erl14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index 68ddce8068..3c6e68101d 100644
--- a/lib/common_test/src/ct.erl
+++ b/lib/common_test/src/ct.erl
@@ -995,13 +995,21 @@ remove_config(Callback, Config) ->
%%%-----------------------------------------------------------------
%%% @spec timetrap(Time) -> ok
-%%% Time = {hours,Hours} | {minutes,Mins} | {seconds,Secs} | Millisecs | infinity
+%%% Time = {hours,Hours} | {minutes,Mins} | {seconds,Secs} | Millisecs | infinity | Func
%%% Hours = integer()
%%% Mins = integer()
%%% Secs = integer()
%%% Millisecs = integer() | float()
-%%%
-%%% @doc <p>Use this function to set a new timetrap for the running test case.</p>
+%%% Func = {M,F,A} | fun()
+%%% M = atom()
+%%% F = atom()
+%%% A = list()
+%%%
+%%% @doc <p>Use this function to set a new timetrap for the running test case.
+%%% If the argument is <code>Func</code>, the timetrap will be triggered
+%%% when this function returns. <code>Func</code> may also return a new
+%%% <code>Time</code> value, which in that case will be the value for the
+%%% new timetrap.</p>
timetrap(Time) ->
test_server:timetrap_cancel(),
test_server:timetrap(Time).