i wanna use the Sleep fucntion in a CLR vc++ app, if i include windows.h it gives a huge list of errors, if i use _sleep() then it dowsnot work at many systems since its obslete. what should i do? i am bound to use CLR bcoz my code uses items from the namespace System.

P.s i am using visual studio 2010

#include <windows.h>

Sleep(1000);

that works fine.. doesn't give me any errors..

if i include windows.h in a CLR console app (c++) it gives so much ambigious call errors of IServiceProvider. so i cant use Sleep() and solution to fix it?

sweet :) thanks. solved.