25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +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(), history :: lqueue(),
subject = [] :: [text()], subject = [] :: [text()],
subject_author = <<"">> :: binary(), 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(), activity = treap:empty() :: treap:treap(),
room_shaper = none :: shaper:shaper(), room_shaper = none :: shaper:shaper(),
room_queue :: p1_queue:queue() | undefined 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) -> true when (HistorySize == 0) or (JustCreated == true) ->
{false, 0}; {false, 0};
true -> true ->
Ts_diff = (misc:now_to_usec(now()) Ts_diff = (p1_time_compat:os_system_time(micro_seconds)
- S#state.just_created) div 1000000, - S#state.just_created) div 1000000,
{false, Ts_diff}; {false, Ts_diff};
false -> false ->

View File

@ -1960,7 +1960,7 @@ add_new_user(From, Nick, Packet, StateData) ->
ResultState = ResultState =
case NewStateData#state.just_created of case NewStateData#state.just_created of
true -> 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), Robots = maps:remove(From, StateData#state.robots),
NewStateData#state{robots = Robots} NewStateData#state{robots = Robots}