コード例 #1
0
        private static void MeasureAverageCalc(string header, IStockTradeHistory sth)
        {
            watch.Restart();
            sth.GetAverages();
            long mSecs = watch.ElapsedMilliseconds;

            Console.WriteLine($"{header} took {mSecs} msecs.");
        }
コード例 #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();
 }