summaryrefslogtreecommitdiff
path: root/src/statusreport.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/statusreport.erl')
-rw-r--r--src/statusreport.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/statusreport.erl b/src/statusreport.erl
index f0b7503..a9fef7f 100644
--- a/src/statusreport.erl
+++ b/src/statusreport.erl
@@ -29,7 +29,7 @@ init([]) ->
{ok, #state{timer = none,
nodename = http_auth:own_name(),
statusreports = dict:new(),
- lastsent = erlang:monotonic_time(millisecond) - ReportInterval}}.
+ lastsent = plop_compat:monotonic_time(millisecond) - ReportInterval}}.
store_status(State, Service, Target, Variable, Status) ->
Statusreports = dict:store({Service, Target, Variable},
@@ -101,7 +101,7 @@ set_timer(State) ->
case State#state.timer of
none ->
ReportInterval = application:get_env(plop, status_report_interval, 1000),
- Timer = erlang:start_timer(State#state.lastsent + ReportInterval, self(), force_send, [{abs, true}]),
+ Timer = plop_compat:start_timer(State#state.lastsent + ReportInterval, self(), force_send, [{abs, true}]),
State#state{timer = Timer};
_ ->
State
@@ -174,12 +174,12 @@ force_send(State) ->
send(Service, Statusreports, State#state.nodename)
end, group_by_service(State#state.statusreports)),
NewState = cancel_timer(State),
- NewState#state{statusreports = dict:new(), lastsent = erlang:monotonic_time(millisecond)}.
+ NewState#state{statusreports = dict:new(), lastsent = plop_compat:monotonic_time(millisecond)}.
try_send(State) ->
ReportInterval = application:get_env(plop, status_report_interval, 1000),
NextSend = State#state.lastsent + ReportInterval,
- Now = erlang:monotonic_time(millisecond),
+ Now = plop_compat:monotonic_time(millisecond),
if
NextSend > Now ->
lager:debug("status report sent ~p ms ago, setting timer", [NextSend - Now]),