diff options
author | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-07-17 22:15:56 +0300 |
---|---|---|
committer | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-07-17 22:15:56 +0300 |
commit | d718b35d462e8096de7cc711591020cea23050d2 (patch) | |
tree | bf7215f5252a1dbcd01ab066a626386ab1ca79ac /src/mod_pres_counter.erl | |
parent | Improve RPC calls in mod_configure (diff) |
Use econf:timeout() instead of econf:pos_int() wherever appropriate
Diffstat (limited to '')
-rw-r--r-- | src/mod_pres_counter.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_pres_counter.erl b/src/mod_pres_counter.erl index 9c50eb104..8c9f2ae1d 100644 --- a/src/mod_pres_counter.erl +++ b/src/mod_pres_counter.erl @@ -80,7 +80,7 @@ check_packet(Acc, _, _, _) -> update(Server, JID, Dir) -> StormCount = mod_pres_counter_opt:count(Server), TimeInterval = mod_pres_counter_opt:interval(Server), - TimeStamp = erlang:system_time(second), + TimeStamp = erlang:system_time(millisecond), case read(Dir) of undefined -> write(Dir, @@ -125,7 +125,7 @@ write(K, V) -> put({pres_counter, K}, V). mod_opt_type(count) -> econf:pos_int(); mod_opt_type(interval) -> - econf:pos_int(). + econf:timeout(second). mod_options(_) -> - [{count, 5}, {interval, 60}]. + [{count, 5}, {interval, timer:seconds(60)}]. |