How do i come out from this problem? Is ther any subsitute solution for sleep() which supports with 16 bit compilerCode:Hi all, I want to make my application to sleep for a second so i have implemented it with static void sleep(int iSecs) { int iCount=0; unsigned long int t=clock()+(1000L*iSecs); while(clock()<t) ; } which is working fine. The problem comes when the Time hits to 11:59:58 PM the clock() reduces to 0 n mean while t has reached maximum value as a result this while loop is going too long n making my program halt for more than 30 min.