X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fbenchmark%2Flock.cs;fp=mono%2Fbenchmark%2Flock.cs;h=28e9bf1c41b44e77a51119a63a0988ac01943544;hb=b678c0c3a733a94b741c48dcae2a0e0b00dc27db;hp=0000000000000000000000000000000000000000;hpb=188421611f1d109ff84d4dbf852af099c86e2882;p=mono.git diff --git a/mono/benchmark/lock.cs b/mono/benchmark/lock.cs new file mode 100644 index 00000000000..28e9bf1c41b --- /dev/null +++ b/mono/benchmark/lock.cs @@ -0,0 +1,13 @@ +using System; +class T { + static void Main () { + int i = Environment.TickCount; + new T ().X (); + Console.WriteLine (Environment.TickCount - i); + } + + void X () { + for (int i = 0; i < 10000000; i ++) + lock (this) {} + } +} \ No newline at end of file