/** * testFibo2. * * @return */ public static long testFiboWith2Threads() { DateTime start = DateTime.Now; for (int i = NB_FIBO_TESTS; i != 0; i--) { int fibo = ThreadFibo.fibWith2Threads(FIBO_N); } DateTime end = DateTime.Now; TimeSpan executionTime = end - start; Console.WriteLine("[ThreadingTest], Invoke of " + NB_FIBO_TESTS + " int fibo = ThreadFibo.fibWith2Threads(" + FIBO_N + ") ,, snapshot time," + executionTime.TotalMilliseconds); return((long)executionTime.TotalMilliseconds); }
public void call() { result = ThreadFibo.fib(n); }