本文共 321 字,大约阅读时间需要 1 分钟。
1、Timer
2、Sleep, SleepEx
得包含头文件#include "windows.h" (保险起见,放在第一行)
函数说明:https://msdn.microsoft.com/en-us/library/windows/desktop/ms686307(v=vs.85).aspx
3、多媒体定时器等
包含头文件 #include "mmsystem.h"
//延时msvoid CVICALLBACK NewDelay(int time){ long t1,t2; t1=timeGetTime(); while(1){ t2=timeGetTime(); if(t2-t1>time){ break; } }}