MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / secondsToString

Method secondsToString

tools/mcsim/ControlsPane.js:440–455  ·  view source on GitHub ↗
(seconds)

Source from the content-addressed store, hash-verified

438 this.direction = 0 - this.direction;
439 }
440 secondsToString(seconds) {
441 let string = "";
442 let value = Math.floor(seconds / 3600);
443 if (value) {
444 string = value.toString() + ":";
445 seconds %= 3600;
446 }
447 value = Math.floor(seconds / 60);
448 if (value < 10) string += "0";
449 string += value.toString() + ":";
450 seconds %= 60;
451 value = Math.floor(seconds);
452 if (value < 10) string += "0";
453 string += value.toString();
454 return string;
455 }
456 },
457 contents: [
458 Label($, { width:120, style:styles.controlName, string:$.label }),

Callers 2

onDisplayingMethod · 0.80
onTimeChangedMethod · 0.80

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected