Skip to content

Commit 3f7f34f

Browse files
committed
Improve timer:tc/1,2,3 specs
1 parent 5c44cb6 commit 3f7f34f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/stdlib/src/timer.erl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ finished or not.
384384
> started in intervals of 1ms, which would result in 1,000,000 processes running
385385
> at the same time, far more than a node started with default settings allows
386386
> (see the
387-
> [System Limits section in the Effiency Guide](`e:system:system_limits.md`)).
387+
> [System Limits section in the Efficiency Guide](`e:system:system_limits.md`)).
388388
""".
389389
-spec apply_interval(Time, Module, Function, Arguments) ->
390390
{'ok', TRef} | {'error', Reason}
@@ -562,7 +562,7 @@ sleep(T) ->
562562
-doc(#{equiv => tc(Fun, microsecond)}).
563563
-doc(#{since => ~"OTP R14B03"}).
564564
-spec tc(Fun) -> {Time, Value}
565-
when Fun :: function(),
565+
when Fun :: fun(() -> term()),
566566
Time :: integer(),
567567
Value :: term().
568568
tc(F) ->
@@ -583,12 +583,12 @@ Measures the execution time of `Fun` in `TimeUnit` if called as `tc(Fun, TimeUni
583583
""".
584584
-doc #{ since => ~"OTP R14B" }.
585585
-spec tc(Fun, Arguments) -> {Time, Value}
586-
when Fun :: function(),
586+
when Fun :: fun((...) -> term()),
587587
Arguments :: [term()],
588588
Time :: integer(),
589589
Value :: term();
590590
(Fun, TimeUnit) -> {Time, Value}
591-
when Fun :: function(),
591+
when Fun :: fun(() -> term()),
592592
TimeUnit :: erlang:time_unit(),
593593
Time :: integer(),
594594
Value :: term().
@@ -621,7 +621,7 @@ Equivalent to [`tc(erlang, apply, [Fun, Arguments], TimeUnit)`](`tc/4`) if calle
621621
Time :: integer(),
622622
Value :: term();
623623
(Fun, Arguments, TimeUnit) -> {Time, Value}
624-
when Fun :: function(),
624+
when Fun :: fun((...) -> term()),
625625
Arguments :: [term()],
626626
TimeUnit :: erlang:time_unit(),
627627
Time :: integer(),

0 commit comments

Comments
 (0)