@@ 175-191 (lines=17) @@ | ||
172 | * @param float $time |
|
173 | * @return string |
|
174 | */ |
|
175 | protected function FormatTime($time) { |
|
176 | // Split dur by '.' to make solid width |
|
177 | $sec = floor($time); |
|
178 | $usec = substr(strval(round($time - $sec, 3)), 2); |
|
179 | $html = <<<EOF |
|
180 | ||
181 | <div style="float: left; width: 4em; text-align: right;"> |
|
182 | {$sec} |
|
183 | </div> |
|
184 | <div style="float: left;">.</div> |
|
185 | <div style="float: left; width: 3em; text-align: left;"> |
|
186 | {$usec} |
|
187 | </div> |
|
188 | ||
189 | EOF; |
|
190 | return $html; |
|
191 | } // end of func FormatTime |
|
192 | ||
193 | ||
194 | /** |
@@ 63-74 (lines=12) @@ | ||
60 | * @param float $time |
|
61 | * @return string |
|
62 | */ |
|
63 | protected function formatTime($time) |
|
64 | { |
|
65 | // Split dur by '.' to make solid width |
|
66 | $sec = floor($time); |
|
67 | $usec = substr(strval(round($time - $sec, 3)), 2); |
|
68 | $html = <<<EOF |
|
69 | <span class='fwlib-benchmark__marker__sec'>{$sec}</span> |
|
70 | <span class='fwlib-benchmark__marker__dot'>.</span> |
|
71 | <span class='fwlib-benchmark__marker__usec'>{$usec}</span> |
|
72 | EOF; |
|
73 | return $html; |
|
74 | } |
|
75 | ||
76 | ||
77 | /** |