diff options
author | Brujo Benavides <[email protected]> | 2019-04-12 09:32:47 -0300 |
---|---|---|
committer | Brujo Benavides <[email protected]> | 2019-04-12 09:41:01 -0300 |
commit | 21e50952eb74625f5bf26d392c8945eae561267d (patch) | |
tree | 0ce02ea1bab5497dfd3984f6e53a3d654b8b2236 /lib | |
parent | c24ea58313c7a2b837831c9c8f9439d0ababe5df (diff) | |
download | otp-21e50952eb74625f5bf26d392c8945eae561267d.tar.gz otp-21e50952eb74625f5bf26d392c8945eae561267d.tar.bz2 otp-21e50952eb74625f5bf26d392c8945eae561267d.zip |
Fix specs and type definitions in cpu_sup
Since `dummy_result/1` returns integers (i.e. `0`) not floats, `util/0,1` specs should account for that.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/os_mon/src/cpu_sup.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/os_mon/src/cpu_sup.erl b/lib/os_mon/src/cpu_sup.erl index ba2d89313e..d28f229b3e 100644 --- a/lib/os_mon/src/cpu_sup.erl +++ b/lib/os_mon/src/cpu_sup.erl @@ -68,7 +68,7 @@ -type util_cpus() :: 'all' | integer() | [integer()]. -type util_state() :: 'user' | 'nice_user' | 'kernel' | 'wait' | 'idle'. --type util_value() :: [{util_state(), float()}] | float(). +-type util_value() :: [{util_state(), number()}] | number(). -type util_desc() :: {util_cpus(), util_value(), util_value(), []}. %%---------------------------------------------------------------------- @@ -122,7 +122,7 @@ util(Args) when is_list (Args) -> util(_) -> erlang:error(badarg). --spec util() -> float() | {'error', any()}. +-spec util() -> number() | {'error', any()}. util() -> case util([]) of |