text: public override void FormatValue(StringBuilder toAppendTo, Object value){double elapsed = ((double)value);if (elapsed < 0){toAppendTo.Append('-');elapsed = -elapsed;}long[] parts = new long[specs.Count];for (int i = 0; i < specs.Count; i++){parts[i] = specs[(i)].ValueFor(elapsed);}string[] fmtPart = printfFmt.Split(":. []".ToCharArray());string split = string.Empty;int pos = 0;int index = 0;Regex regFmt = new Regex("D\\d+");foreach (string fmt in fmtPart){pos += fmt.Length;if (pos < printfFmt.Length){split = printfFmt[pos].ToString();pos++;}elsesplit = string.Empty;if (regFmt.IsMatch(fmt)){toAppendTo.Append(parts[index].ToString(fmt)).Append(split);index++;}else{toAppendTo.Append(fmt).Append(split);}}}