From the Microsoft documentation on Sleep(): "Use caution when calling timeBeginPeriod, as frequent calls can significantly affect the system clock, system power usage, and the scheduler. If you call timeBeginPeriod, call it one time early in the application and be sure to call the timeEndPeriod function at the very end of the application." (Emphasis by me.) If
fastType()
is called often, the timeBeginPeriod()
call should perhaps be made by the caller (e.g., `main()``).