private static void TestUncontented()
{
const int n = 100000000;
Stopwatch stopwatch = Stopwatch.StartNew();
for ( int i = 0; i < n; i++ )
{
Monitor.Enter( sync );
Monitor.Exit( sync );
}
stopwatch.Stop();
WriteTime("Uncontended lock", n, stopwatch.ElapsedTicks);
}