static void TestContendedEnter() { const int n = 100000000; Stopwatch stopwatch = Stopwatch.StartNew(); int j = 0; for (int i = 0; i < n; i++) { lock ( sync ) { j++; } } stopwatch.Stop(); WriteTime("Contented Monitor", n, stopwatch.ElapsedTicks); }