#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
static struct timeval icmp_tvsub(struct timeval end,struct timeval begin)
{
struct timeval tv;//这个编译没提示错误
tv.tv_sec=end.tv_sec-begin.tv_sec;
tv.tv_usec=end.tv_usec-begin.tv_usec;
……
}
static struct timeval icmp_tvsub(struct timeval end,struct timeval begin)
{
struct timeval tv;//在统一个程序中,这个就提示 tv存储大小未知的错误,不明白啊
tv.tv_sec=end.tv_sec-begin.tv_sec;
tv.tv_usec=end.tv_usec-begin.tv_usec;
if(tv.tv_usec<0)
{
tv.tv_sec--;
tv.tv_usec+=1000000;
}
return tv;
}