I tried to use the following code to measure how many spins I need to wait for a millisecond using Thread.SpinWait(int). But the code gives me unstable results.
Thread.SpinWait(int)