B-0 reverted back all changes
B-0 moved here code to set quantum lenght under windows to allow sleep to work properly