04-17-2006 07:35 PM
04-17-2006 09:02 PM
sleep (and usleep) are part of the POSIX standard, not ANSI. Because of this, they are not available in CVI. This is because the 'sleep and yield' behavior is implemented in a platform specific way. CVI provides Delay, but this is a busy wait and probably not what you want. You can call Sleep on Windows via the win32 SDK; just include windows.h.
Hope this helps,
-alex
04-17-2006 11:12 PM
Delay was exactly what I was looking for thanks.
Discover005-16-2006 01:05 PM
Delay eats up CPU time. The Windows SDK Sleep function does not. Just include windows.h and call Sleep.
See the knowledgebase article here:
http://digital.ni.com/public.nsf/allkb/249E22A8822445D386256D9D0056D00E