If you get the boost libraries you can put that function in another thread and then have it wake up every XXX milliseconds or so. Don't expect very accurate timeing because that will not happen on multi-process operating systems like *nix and MS-Windows.
There are other ways too, some os dependent and some not. None of them are very nice.
dos.h is only supported bo borland's TurboC and TurboC++ compilers, Microsoft VC q1.52C (and earlier), and maybe some very old versions of Watcom C. No other compilers has it. All those compilers are dead in the commercial world and only used by hobbiests today.