sec=(uint32_t)(now/1000000);/* convert to seconds */
ntp_sec=sec+NTP_TIME_OFFSET;/* convert to NTP seconds */
sr->ntp_msw=htonl(ntp_sec);/* store result in "most significant word" */
ntp_usec=now-(sec*1000000);/* remove seconds to keep only the microseconds */
sr->ntp_lsw=htonl(ntp_usec*(double)(((uint64_t)1)<<32)*1.0e-6);/* convert microseconds to fraction of 32bits and store result in "least significatn word" */
ntp_usec=(uint32_t)(now-(sec*1000000));/* remove seconds to keep only the microseconds */
sr->ntp_lsw=htonl((u_long)(ntp_usec*(double)(((uint64_t)1)<<32)*1.0e-6));/* convert microseconds to fraction of 32bits and store result in "least significatn word" */
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session),SWITCH_LOG_DEBUG,"RTCP send rate is: %d and packet rate is: %d Remote Port: %d\n",send_rate,rtp_session->ms_per_packet,rtp_session->remote_rtcp_port);