Sleep ( ) ;
DWORD dwTickStart = GetTickCount ( ) ; // ... if ( GetTickCount ( ) - dwTickStart > 2000 ) { // action dwTickStart = GetTickCount ( ) ; }