25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Remove now() calls that sneaked in in pull requests

This commit is contained in:
Paweł Chmielowski 2019-02-26 18:48:46 +01:00
parent 0c0862475f
commit 77ac0584ed
3 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@
history :: lqueue(),
subject = [] :: [text()],
subject_author = <<"">> :: binary(),
just_created = misc:now_to_usec(now()) :: true | integer(),
just_created = p1_time_compat:os_system_time(micro_seconds) :: true | integer(),
activity = treap:empty() :: treap:treap(),
room_shaper = none :: shaper:shaper(),
room_queue :: p1_queue:queue() | undefined

View File

@ -819,7 +819,7 @@ decide_room(unused, {_Room_name, _Host, Room_pid}, ServerHost, Last_allowed) ->
true when (HistorySize == 0) or (JustCreated == true) ->
{false, 0};
true ->
Ts_diff = (misc:now_to_usec(now())
Ts_diff = (p1_time_compat:os_system_time(micro_seconds)
- S#state.just_created) div 1000000,
{false, Ts_diff};
false ->

View File

@ -1960,7 +1960,7 @@ add_new_user(From, Nick, Packet, StateData) ->
ResultState =
case NewStateData#state.just_created of
true ->
NewStateData#state{just_created = misc:now_to_usec(now())};
NewStateData#state{just_created = p1_time_compat:os_system_time(micro_seconds)};
_ ->
Robots = maps:remove(From, StateData#state.robots),
NewStateData#state{robots = Robots}