changed c# timing code to use similar setting as C++