File 7401-Improve-timer-tc-1-2-3-specs.patch of Package erlang

From 3f7f34fc11f566e0a043041efc166b09c59bdbdb Mon Sep 17 00:00:00 2001
From: Jan Uhlig <juhlig@hnc-agency.org>
Date: Thu, 12 Mar 2026 15:44:50 +0100
Subject: [PATCH] Improve timer:tc/1,2,3 specs

---
 lib/stdlib/src/timer.erl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/stdlib/doc/src/timer.xml b/lib/stdlib/doc/src/timer.xml
index 5f3a7bceee..b3915b557e 100644
--- a/lib/stdlib/doc/src/timer.xml
+++ b/lib/stdlib/doc/src/timer.xml
@@ -104,7 +104,7 @@
             1,000,000 processes running at the same time, far more than a node
             started with default settings allows (see the
             <seeguide marker="system/efficiency_guide:advanced#system-limits">System
-            Limits section in the Effiency Guide</seeguide>).</p>
+            Limits section in the Efficiency Guide</seeguide>).</p>
         </warning>
         <p>Returns <c>{ok, <anno>TRef</anno>}</c> or
           <c>{error, <anno>Reason</anno>}</c>.</p>
diff --git a/lib/stdlib/src/timer.erl b/lib/stdlib/src/timer.erl
index 5f3a7bceee..b3915b557e 100644
--- a/lib/stdlib/src/timer.erl
+++ b/lib/stdlib/src/timer.erl
@@ -562,7 +562,7 @@ sleep(T) ->
 %% Measure the execution time (in microseconds) for Fun().
 %%
 -spec tc(Fun) -> {Time, Value}
-              when Fun :: function(),
+              when Fun :: fun(() -> term()),
                    Time :: integer(),
                    Value :: term().
 tc(F) ->
@@ -583,12 +583,12 @@ Measures the execution time of `Fun` in `TimeUnit` if called as `tc(Fun, TimeUni
 %%      or the execution time (in TimeUnit) for Fun().
 %%
 -spec tc(Fun, Arguments) -> {Time, Value}
-              when Fun :: function(),
+              when Fun :: fun((...) -> term()),
                    Arguments :: [term()],
                    Time :: integer(),
                    Value :: term();
         (Fun, TimeUnit) -> {Time, Value}
-              when Fun :: function(),
+              when Fun :: fun(() -> term()),
                    TimeUnit :: erlang:time_unit(),
                    Time :: integer(),
                    Value :: term().
@@ -621,7 +621,7 @@ Equivalent to [`tc(erlang, apply, [Fun, Arguments], TimeUnit)`](`tc/4`) if calle
                    Time :: integer(),
                    Value :: term();
         (Fun, Arguments, TimeUnit) -> {Time, Value}
-              when Fun :: function(),
+              when Fun :: fun((...) -> term()),
                    Arguments :: [term()],
                    TimeUnit :: erlang:time_unit(),
                    Time :: integer(),
-- 
2.51.0

openSUSE Build Service is sponsored by