using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace MLBlazorRCL
{
 class Berechnungen
 {
  private int Fibonacci(int n)
  {
   int a = 0;
   int b = 1;
   // In N steps compute Fibonacci sequence iteratively.
   for (int i = 0; i < n; i++)
   {
    int temp = a;
    a = b;
    b = temp + b;
   }
   return a;
  }

  public long Start(int anzahl = 100000, int start = 0, int end = 45)
  {

   Stopwatch sw = new Stopwatch();
   sw.Start();
   List<int> results = new List<int>();

   for (int j = 0; j < anzahl; j++)
   {
    for (int i = start; i < end; i++)
    {
     results.Add(Fibonacci(i));
    }
   }


   sw.Stop();
   return sw.ElapsedMilliseconds;
  }
 }
}
