I think your number formatter is overly complex. If I understand correctly, don't you just want to ensure that milliseconds are 3 digits and seconds/minutes/hours are 2 digits? If so and you are certain the string value is a number then just let the framework format it for you.
string NumberFormatter ( int width, string value )
{
if (Int32.TryParse(value, out var number))
return number.ToString(new string('0', width));
return "";
}
//Calling
milliseconds = NumberFormatter(3, milliseconds);
Alternatively you could go with padding instead.
string NumberFormatter ( int width, string value )
{
return value.PadLeft(width, '0');
};