fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42292?usp=email )
Change subject: pfcp_peer: replace deprecated erlang:timestamp/0 with os:system_time/1 ......................................................................
pfcp_peer: replace deprecated erlang:timestamp/0 with os:system_time/1
erlang:timestamp/0 is deprecated since OTP 18. os:system_time(second) is the modern replacement and yields the result directly in seconds, removing the need to reassemble the {MegaSec, Sec, _} tuple.
Change-Id: I4ad886a2222f0cee8a668b42efe8bfac800a55ac --- M src/pfcp_peer.erl 1 file changed, 2 insertions(+), 3 deletions(-)
Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve
diff --git a/src/pfcp_peer.erl b/src/pfcp_peer.erl index a4cc2d5..e1b3aa1 100644 --- a/src/pfcp_peer.erl +++ b/src/pfcp_peer.erl @@ -477,11 +477,10 @@
-spec get_recovery_timestamp() -> pos_integer(). get_recovery_timestamp() -> - {NowMS, NowS, _NowUS} = erlang:timestamp(), - %% erlang:timestamp() returns time relative to the UNIX epoch (1970), + %% os:system_time/1 returns time relative to the UNIX epoch (1970), %% but for PFCP we need time relative to the NTP era 0 (1900). %% 2208988800 is the diff between 1900 and 1970. - NowMS * 1_000_000 + NowS + 2208988800. + os:system_time(second) + 2208988800.
-spec get_f_seid(pfcp_seid(), peer_state()) -> pfcp_f_seid().