mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-01-18 22:09:35 +08:00
some useless change
This commit is contained in:
parent
f7c2d15adc
commit
ecc90928d3
@ -117,8 +117,10 @@ int delay_manager_t::check()
|
||||
if(!delay_mp.empty())
|
||||
{
|
||||
const double m=1000*1000;
|
||||
double timer_value=delay_mp.begin()->first/m -get_current_time_us()/m; // be aware of negative value, and be aware of uint
|
||||
if(timer_value<0) timer_value=0; // set it to 0 if negative, although libev support negative value
|
||||
ev_timer_stop(loop, &timer);
|
||||
ev_timer_set(&timer, delay_mp.begin()->first/m -get_current_time_us()/m,0 );
|
||||
ev_timer_set(&timer, timer_value,0 );
|
||||
ev_timer_start(loop, &timer);
|
||||
}
|
||||
else
|
||||
|
@ -186,8 +186,10 @@ int fec_encode_manager_t::append(char *s,int len/*,int &is_first_packet*/)
|
||||
{
|
||||
first_packet_time=get_current_time_us();
|
||||
|
||||
const double m=1000*1000;
|
||||
|
||||
ev_timer_stop(loop, &timer);
|
||||
ev_timer_set(&timer, fec_par.timeout/1000000.0 ,0 );
|
||||
ev_timer_set(&timer, fec_par.timeout/m,0 );
|
||||
ev_timer_start(loop, &timer);
|
||||
}
|
||||
if(fec_par.mode==0)//for type 0 use blob
|
||||
|
Loading…
x
Reference in New Issue
Block a user