mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-07 17:04:58 +01:00
11 lines
No EOL
192 B
JavaScript
11 lines
No EOL
192 B
JavaScript
export default function(millis){
|
|
if (millis < 1000) {
|
|
return fixed(millis) + "ms";
|
|
} else {
|
|
return fixed(millis / 1000) + "s";
|
|
}
|
|
};
|
|
|
|
function fixed(v) {
|
|
return v.toFixed(2);
|
|
} |