Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

是否有一个函数来替代延时函数?

主要软件: LabWindows/CVI Development Systems>>Full Development System
主要软件版本: N/A
主要软件修正版本: N/A
次要软件: N/A

问题: 延时函数不能处理系统事件。这里是否有一个函数来替代延时函数?

解答: 试试下面的函数。输入参数的最低值取决于最小的计时器值。

#include <utility.h>
#include <userint.h>

int wait (double delay)
{
static double time1;
static double time2;

time1 = Timer();
time2 = Timer();
while ((time2 - time1) < delay)
{
time2 = Timer();
ProcessSystemEvents();
}

return 0;
}


相关链接:

附件:





报告日期: 12/13/2006
最近更新: 12/17/2006
文档编号: 11NGHA52

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit