mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-13 13:40:44 +00:00
use less expensive time func in rtp stack
This commit is contained in:
parent
8b195824db
commit
a46c897208
@ -1058,7 +1058,7 @@ static int check_srtp_and_ice(switch_rtp_t *rtp_session)
|
|||||||
if (rtp_session->send_time) {
|
if (rtp_session->send_time) {
|
||||||
when = rtp_session->send_time;
|
when = rtp_session->send_time;
|
||||||
} else {
|
} else {
|
||||||
when = switch_time_now();
|
when = switch_micro_time_now();
|
||||||
}
|
}
|
||||||
|
|
||||||
sr->ntp_msw = htonl((u_long)(when / 1000000 + 2208988800UL));
|
sr->ntp_msw = htonl((u_long)(when / 1000000 + 2208988800UL));
|
||||||
@ -4425,7 +4425,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
now = switch_time_now();
|
now = switch_micro_time_now();
|
||||||
#ifdef RTP_DEBUG_WRITE_DELTA
|
#ifdef RTP_DEBUG_WRITE_DELTA
|
||||||
{
|
{
|
||||||
int delta = (int) (now - rtp_session->send_time) / 1000;
|
int delta = (int) (now - rtp_session->send_time) / 1000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user