Created
December 16, 2015 01:11
-
-
Save sax1johno/5bc569de8a9e8b5a0fbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var totalSec = yourTime / 1000; | |
var minutes = parseInt( totalSec / 60 ) % 60; | |
var seconds = totalSec % 60; | |
var result = (hours < 10 ? "0" + hours : hours) + "-" + (minutes < 10 ? "0" + minutes : minutes) + "-" + (seconds < 10 ? "0" + seconds : seconds); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
var result = minutes + ":" + (seconds < 10 ? "0" + seconds : seconds);