diff --git a/include/mod_muc_room.hrl b/include/mod_muc_room.hrl index 40b1b9c04..9111128c0 100644 --- a/include/mod_muc_room.hrl +++ b/include/mod_muc_room.hrl @@ -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 diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl index f75e24b7d..b3840bc48 100644 --- a/src/mod_muc_admin.erl +++ b/src/mod_muc_admin.erl @@ -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 -> diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index a8818aca4..ec1222855 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -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}