37天过后,GetTickCount()时间若溢出复位,时间差会不会有问题?可不可以TickCount复位?
cpboy 2005-10-06 02:37:14 37天过后,GetTickCount()时间若溢出复位,时间差会不会有问题?
GetTickCount()为DWORD类型,记录呢Windows37天运行的ms数
我的程序:
ts_now=GetTickCount();
ts_pre=ts_now;
do {
...
ts_now=GetTickCount();
if(ts_now-ts_pre>=100) { //大于100ms
Display(....)
ts_pre=ts_now;
}
}while(循环条件)
若ts_now=GetTickCount()从最大数变成0或者很小的数字,则会出现问题
如何解决啊。有没有函数让TickCount复位?