Related code as follows:
while (next_tv.tv_usec < 0){
next_tv.tv_usec += 1000000;
next_tv.tv_sec--;
}
if (next_tv.tv_sec < 0 || (next_tv.tv_sec == 0 && next_tv.tv_usec < 0)){
next_tv.tv_sec = 0;
next_tv.tv_usec = 0;
}
the "while" line ensure "next_tv.tv_usec >= 0", so, the "next_tv.tv_usec < 0"
judgement on "if" line may never be true.
the correct line may as follows:
if (next_tv.tv_sec < 0 || (next_tv.tv_sec == 0 && next_tv.tv_usec == 0)){
Original issue reported on code.google.com by wmy...@126.com on 7 Nov 2013 at 2:56
Original issue reported on code.google.com by
wmy...@126.com
on 7 Nov 2013 at 2:56