Example #1
0
 private static void FormatPretty(StringBuilder sb, TimeSpan ts, Tuple<string, int, Func<TimeSpan, int>> formatter)
 {
     var padding = formatter.Item2;
     if (sb.Length == 0)
         padding = 1;
     else
         sb.Append(" ");
     sb.Append(formatter.Item3(ts).ToString("D" + padding)).Append(formatter.Item1);
 }