time += 1; if( time == 20 ) { OSTaskSuspend(0); //挂起任务0 } if( time == 40 ) { OSTaskResume(0); } if( time > 40 ) { time = 0; }