?? timer.cpp
字號:
/************************************************************************
* file name: timer.cpp
* description: for test use.
* modification history
* --------------------
* 2003-5-3 9:23:11, created by zhuwei
*/
/* includes----------------------------------------------------------- */
#include "timer.h"
/* defines------------------------------------------------------------ */
/* typedefs----------------------------------------------------------- */
/* externs------------------------------------------------------------ */
/* globals------------------------------------------------------------ */
/* forward declarations----------------------------------------------- */
void timer::runtimer()
{
while (true)
{
if (start)
{
cout <<"Timer: timer start detected"<<endl;
count = 5; // need to make this a constant
timeout = false;
start = false;
}
else
{
if (count > 0)
{
count--;
timeout = false;
}
else
{
timeout = true;
}
}
/*-------------------zhuwei add(2003-5-8 9:42:45)--------------------
When the wait() method is called without arguments, the calling thread process will
suspend. When one of the events in the sensitivity list is notified, the waiting
thread process is resumed.
若指定了參數,則suspends the thread of execution until the event specified in the argument
occurs.
----------------------end(2003-5-8 9:42:45)------------------------*/
wait();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -