Display time as hh:mm:ss

  • For a shorter display when hours [or hh:mm] are not required, set the ‘short’ parameter to 1.
  • To display hh:mm:ss without milliseconds, set the second parameter [places] to 0.
  • The ’round’ parameter can be set to round up, round down or round to the closest whole number of seconds.

For full details of all options, please look at the code, but feel free to comment and ask if anything is not clear. So here is the code:

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.