1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | var repeat = exports.repeat = function repeat(str, times) {
|
7 | return new Array(times + 1).join(str);
|
8 | };
|
9 |
|
10 | var pad = exports.pad = function pad(num, maxLength) {
|
11 | return repeat("0", maxLength - num.toString().length) + num;
|
12 | };
|
13 |
|
14 | var formatTime = exports.formatTime = function formatTime(time) {
|
15 | return pad(time.getHours(), 2) + ":" + pad(time.getMinutes(), 2) + ":" + pad(time.getSeconds(), 2) + "." + pad(time.getMilliseconds(), 3);
|
16 | };
|
17 |
|
18 |
|
19 | var timer = exports.timer = typeof performance !== "undefined" && performance !== null && typeof performance.now === "function" ? performance : Date; |
\ | No newline at end of file |