From: Siraaj Khandkar Date: Tue, 11 Aug 2015 22:27:43 +0000 (-0400) Subject: Remove nonexistent type: erlang:time() X-Git-Tag: 0.0.0~19 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=76aefffb4a92500ad4664d120b5ef2fec80e7988;p=beam_stats.git Remove nonexistent type: erlang:time() --- diff --git a/src/beam_stats_config.erl b/src/beam_stats_config.erl index 68a44ed..45d0fc9 100644 --- a/src/beam_stats_config.erl +++ b/src/beam_stats_config.erl @@ -12,7 +12,7 @@ %% ============================================================================ -spec production_interval() -> - erlang:time(). + non_neg_integer(). production_interval() -> get_env(production_interval). diff --git a/src/beam_stats_consumer.erl b/src/beam_stats_consumer.erl index 8d25fa4..fa06695 100644 --- a/src/beam_stats_consumer.erl +++ b/src/beam_stats_consumer.erl @@ -37,7 +37,7 @@ %% ============================================================================ -callback init(Options :: term()) -> - {ConsumptionInterval :: erlang:time(), State :: term()}. + {ConsumptionInterval :: non_neg_integer(), State :: term()}. -callback consume(queue(), State) -> State. @@ -54,7 +54,7 @@ -record(state, { consumer_module :: atom() , consumer_state :: term() - , consumption_interval :: erlang:time() + , consumption_interval :: non_neg_integer() , beam_stats_queue :: queue() }). @@ -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), diff --git a/src/beam_stats_consumer_csv.erl b/src/beam_stats_consumer_csv.erl index c00c28f..b50183e 100644 --- a/src/beam_stats_consumer_csv.erl +++ b/src/beam_stats_consumer_csv.erl @@ -16,7 +16,7 @@ -type option() :: {path , file:filename()} - | {consumption_interval , erlang:time()} + | {consumption_interval , non_neg_integer()} . -record(state, @@ -28,7 +28,7 @@ #state{}. -spec init([option()]) -> - {erlang:time(), state()}. + {non_neg_integer(), state()}. init(Options) -> ConsumptionInterval = hope_kv_list:get(Options, consumption_interval, 60000), {some, Path} = hope_kv_list:get(Options, path), diff --git a/src/beam_stats_consumer_graphite.erl b/src/beam_stats_consumer_graphite.erl index e471bfa..c2847f0 100644 --- a/src/beam_stats_consumer_graphite.erl +++ b/src/beam_stats_consumer_graphite.erl @@ -23,7 +23,7 @@ -type option() :: {connect_options , [connect_option()]} - | {consumption_interval , erlang:time()} + | {consumption_interval , non_neg_integer()} . -record(state, @@ -37,7 +37,7 @@ -define(GRAPHITE_PATH_PREFIX, "beam_stats"). -spec init([option()]) -> - {erlang:time(), state()}. + {non_neg_integer(), state()}. init(Options) -> ConnectOptions = hope_kv_list:get(Options, connect_options , []), ConsumptionInterval = hope_kv_list:get(Options, consumption_interval, 60000), diff --git a/src/beam_stats_consumer_statsd.erl b/src/beam_stats_consumer_statsd.erl index 09a8e95..6baf459 100644 --- a/src/beam_stats_consumer_statsd.erl +++ b/src/beam_stats_consumer_statsd.erl @@ -25,7 +25,7 @@ ]). -type option() :: - {consumption_interval , erlang:time()} + {consumption_interval , non_neg_integer()} | {dst_host , inet:ip_address() | inet:hostname()} | {dst_port , inet:port_number()} | {src_port , inet:port_number()} @@ -65,7 +65,7 @@ %% ============================================================================ -spec init([option()]) -> - {erlang:time(), state()}. + {non_neg_integer(), state()}. init(Options) -> ConsumptionInterval = hope_kv_list:get(Options, consumption_interval, 60000), DstHost = hope_kv_list:get(Options, dst_host, ?DEFAULT_DST_HOST),