File 0945-os_mon-Add-specs-to-all-API-functions.patch of Package erlang

From 6bde4bd0566f0ca9090b968442bbdd6f85c394e1 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Mon, 9 Oct 2023 15:52:50 +0200
Subject: [PATCH 05/13] os_mon: Add specs to all API functions

---
 lib/os_mon/src/disksup.erl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/os_mon/src/disksup.erl b/lib/os_mon/src/disksup.erl
index 8df01f9eb9..714c29b589 100644
--- a/lib/os_mon/src/disksup.erl
+++ b/lib/os_mon/src/disksup.erl
@@ -34,6 +34,8 @@
 %% Other exports
 -export([format_status/2, parse_df/2]).
 
+-type time() :: pos_integer() | {TimeUnit :: erlang:time_unit(), Time :: pos_integer()}.
+
 -record(state, {threshold, timeout, os, diskdata = [],port}).
 
 %%----------------------------------------------------------------------
@@ -48,6 +50,8 @@ get_disk_info(Path) ->
 
 get_check_interval() ->
     os_mon:call(disksup, get_check_interval, infinity).
+
+-spec set_check_interval(time()) -> ok.
 set_check_interval(Minutes) ->
     case param_type(disk_space_check_interval, Minutes) of
 	true ->
-- 
2.35.3

openSUSE Build Service is sponsored by