diff options
author | Raimo Niskanen <[email protected]> | 2010-07-07 10:46:48 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-07-07 10:46:48 +0200 |
commit | a1a9aff12c1365dc155328410c5253d7495f757f (patch) | |
tree | b7b12d6f7cd38f94702bbc946d9671b9583d2738 /lib/stdlib/doc | |
parent | 0aa94b3b70ae9bd99e23f99e51f08d694403fd21 (diff) | |
parent | 2cca6506bafedc5ebb720510151a98602133d8e5 (diff) | |
download | otp-a1a9aff12c1365dc155328410c5253d7495f757f.tar.gz otp-a1a9aff12c1365dc155328410c5253d7495f757f.tar.bz2 otp-a1a9aff12c1365dc155328410c5253d7495f757f.zip |
Merge branch 'cf/timer_tc' into dev
* cf/timer_tc:
Add timer:tc/2 to measure the elapsed time of anonymous functions
Conflicts:
lib/stdlib/doc/src/timer.xml
Diffstat (limited to 'lib/stdlib/doc')
-rw-r--r-- | lib/stdlib/doc/src/timer.xml | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/lib/stdlib/doc/src/timer.xml b/lib/stdlib/doc/src/timer.xml index 034fff3c25..1b34e71490 100644 --- a/lib/stdlib/doc/src/timer.xml +++ b/lib/stdlib/doc/src/timer.xml @@ -202,19 +202,33 @@ </func> <func> <name>tc(Module, Function, Arguments) -> {Time, Value}</name> - <fsummary>Measure the real time it takes to evaluate <c>apply(Module, Function, Arguments)</c></fsummary> + <name>tc(Fun, Arguments) -> {Time, Value}</name> + <fsummary>Measure the real time it takes to evaluate <c>apply(Module, + Function, Arguments)</c> or <c>apply(Fun, Arguments)</c></fsummary> <type> <v>Module = Function = atom()</v> + <v>Fun = fun()</v> <v>Arguments = [term()]</v> <v>Time = integer() in microseconds</v> <v>Value = term()</v> </type> <desc> - <p>Evaluates <c>apply(Module, Function, Arguments)</c> and measures - the elapsed real time as reported by <c>now/0</c>. - Returns <c>{Time, Value}</c>, where - <c>Time</c> is the elapsed real time in <em>microseconds</em>, - and <c>Value</c> is what is returned from the apply.</p> + <p></p> + <taglist> + <tag><c>tc/3</c></tag> + <item> + <p>Evaluates <c>apply(Module, Function, Arguments)</c> and measures + the elapsed real time as reported by <c>now/0</c>. + Returns <c>{Time, Value}</c>, where + <c>Time</c> is the elapsed real time in <em>microseconds</em>, + and <c>Value</c> is what is returned from the apply.</p> + </item> + <tag><c>tc/2</c></tag> + <item> + <p>Evaluates <c>apply(Fun, Arguments)</c>. Otherwise works + like <c>tc/3</c>.</p> + </item> + </taglist> </desc> </func> <func> |