public virtual void TestLoopWithTimeoutReturnsWhenBlockIsFalse()
        {
            StopWatch watch = new AutoStopWatch();

            Runtime4.Retry(500, new _IClosure4_14());
            Assert.IsSmaller(500, watch.Peek());
        }
        public virtual void TestLoopWithTimeoutReturnsAfterTimeout()
        {
            StopWatch watch = new AutoStopWatch();

            Runtime4.Retry(500, new _IClosure4_24());
            watch.Stop();
            Assert.IsGreaterOrEqual(500, watch.Elapsed());
        }
 private static long Time(IProcedure4 procedure4)
 {
     PagingMemoryStorage storage = new PagingMemoryStorage();
     StoreItems(storage);
     StopWatch stopWatch = new AutoStopWatch();
     for (int i = 0; i < Iterations; ++i)
     {
         ApplyProcedure(storage, procedure4);
     }
     return stopWatch.Peek();
 }