Windows timer added adjusted from using this_thread to using windows specific code. Untested, due to lack of windows.