<?php str_pad( string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT): string
<?php private static function formatSeconds(string $s, string $us): string { return sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us)); } }