![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/4/44/44414c02-d064-4424-ae12-8acc58561d02/44414c02-d064-4424-ae12-8acc58561d02-bg84.png)
iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 132
Delay_1()
Func.: Delay some time interval; the time unit is 0.1 ms, use CPU Timer 1.
Syntax:
void Delay_1(unsigned ms);
Header: #include ”iVIEW.h”
Description:
Delay some time interval. Delay unit is .01 ms, use CPU Timer 1.
ms: the time want to delay.
Example: Please refer to “TimerOpen()” for detail information.
Delay_2()
Func.: Delay some time interval; the time unit is 0.01 ms, use CPU Timer 1.
Syntax:
void Delay_2(unsigned ms);
Header: #include ”iVIEW.h”
Description:
Delay some time interval. Delay unit is 0.01 ms, use CPU Timer 1.
ms: the time want to delay.
Example: Please refer to “TimerOpen()” for detail information.
StopWatchStart()
Func.: Start to use a StopWatch channel, and reset the StopWatch value to 0.
Syntax:
int StopWatchStart(int channel);
Header: #include ”iVIEW.h”
Description:
The system timer ISR will increment the StopWatch value by 1 every 1 ms.
channel: 0-7, total 8 channels.
If channel is out of range return ChannelError(-15).
On success return NoError.
Example:
(sdwh.c)
#include <iVIEW.h>
#include <mmi100.h>
void main(void) {
unsigned long value;
int quit=0; InitLib();
Print("\n\rTest StopWatch ... Press 'q' to quit\n\r ");
TimerOpen();
StopWatchStart(0); /*to use the StopWatchStart function*/
while(!quit){
if(Kbhit()){ switch(Getch()){ case 'q': quit=1; break; } }
StopWatchReadValue(0,&value);
Print("SWatch=%d \r",value);
if(value==2000){
StopWatchPause(0);
DelayMs(2000);
StopWatchContinue(0); }
if(value==4000){
StopWatchStop(0);
DelayMs(2000);
StopWatchReset(0);
StopWatchStart(0); }
} TimerClose();
}