fix itimerspec

This commit is contained in:
wangyu 2018-06-03 20:43:57 -07:00
parent 9fd6428525
commit 36f55b7e22
2 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ typedef int i32_t;
typedef unsigned short u16_t;
typedef short i16_t;
struct itimerspec {
struct my_itimerspec {
struct timespec it_interval; /* Timer interval */
struct timespec it_value; /* Initial expiration */
};

View File

@ -176,7 +176,7 @@ int fec_encode_manager_t::append(char *s,int len/*,int &is_first_packet*/)
{
if(counter==0)
{
itimerspec its;
my_itimerspec its;
memset(&its.it_interval,0,sizeof(its.it_interval));
first_packet_time=get_current_time_us();
my_time_t tmp_time=fec_timeout+first_packet_time;
@ -413,7 +413,7 @@ int fec_encode_manager_t::input(char *s,int len/*,int &is_first_packet*/)
output_n=actual_data_num+actual_redundant_num;
blob_encode.clear();
itimerspec its;
my_itimerspec its;
memset(&its,0,sizeof(its));
ev_timer_stop(loop, &timer);
//timerfd_settime(timer_fd,TFD_TIMER_ABSTIME,&its,0);