Exemplo n.º 1
0
        private static void MeasureAverageCalc(string header, IStockTradeHistory sth)
        {
            watch.Restart();
            sth.GetAverages();
            long mSecs = watch.ElapsedMilliseconds;

            Console.WriteLine($"{header} took {mSecs} msecs.");
        }
Exemplo n.º 2
0
 private static void PrintAverages(string header, IStockTradeHistory sth)
 {
     Console.WriteLine(header);
     foreach (var average in sth.GetAverages())
     {
         Console.WriteLine($"{average.Key} @ {average.Value:F3}");
     }
     Console.WriteLine();
 }