mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-01-31 12:19:35 +08:00
fix itimerspec
This commit is contained in:
parent
9fd6428525
commit
36f55b7e22
2
common.h
2
common.h
@ -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 */
|
||||
};
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user