欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標(biāo)題: c語言流池濾波法(瞎琢磨的,濾波效果灰常好) [打印本頁]

作者: xiaojuan    時(shí)間: 2014-9-17 22:35
標(biāo)題: c語言流池濾波法(瞎琢磨的,濾波效果灰常好)
uint16 FlowPoolFilter(uint32 *Pool,uint16 Data,uint8 *PoolIndex,uint8 PoolSize)
{
(*Pool)+=Data;
if((*PoolIndex)< PoolSize )(*PoolIndex)++;
else (*Pool)-=((*Pool)/(*PoolIndex));
return (*Pool)/(*PoolIndex);
}
Eg: 獲取TOS  CPU的使用率

void Tos_ComputeCPURate()
{
static uint8 Count,i;
static uint32 Pool;
static uint8 Use;
if(_Tos_TaskTotal-1!=Tos_TaskCurrent)Use++;
Count++;
if(Count>100){Count=0;Tos_CPUInfor.Userate_CPU=FlowPoolFilter(&Pool,Use,&i,100);Use=0;}
}








歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1