Use module() instead of atom() where applicable
[beam_stats.git] / src / beam_stats_consumer.erl
index 8d25fa4..eb8cbb7 100644 (file)
@@ -37,7 +37,7 @@
 %% ============================================================================
 
 -callback init(Options :: term()) ->
-    {ConsumptionInterval :: erlang:time(), State :: term()}.
+    {ConsumptionInterval :: non_neg_integer(), State :: term()}.
 
 -callback consume(queue(), State) ->
     State.
@@ -52,9 +52,9 @@
 -define(SIGNAL_CONSUMPTION , beam_stats_consumption_signal).
 
 -record(state,
-    { consumer_module      :: atom()
+    { consumer_module      :: module()
     , consumer_state       :: term()
-    , consumption_interval :: erlang:time()
+    , consumption_interval :: non_neg_integer()
     , beam_stats_queue     :: queue()
     }).
 
@@ -62,7 +62,7 @@
 %%  Public API
 %% ============================================================================
 
--spec add(atom(), term()) ->
+-spec add(module(), term()) ->
     supervisor:startchild_ret().
 add(ConsumerModule, ConsumerOptions) ->
     beam_stats_sup_consumers:start_child(ConsumerModule, ConsumerOptions).
@@ -136,7 +136,7 @@ schedule_first_consumption() ->
     _ = self() ! ?SIGNAL_CONSUMPTION,
     ok.
 
--spec schedule_next_consumption(erlang:time()) ->
+-spec schedule_next_consumption(non_neg_integer()) ->
     ok.
 schedule_next_consumption(Time) ->
     _ = erlang:send_after(Time, self(), ?SIGNAL_CONSUMPTION),
This page took 0.025288 seconds and 4 git commands to generate.