Elapsed Time

Show Elapsed Time

Introduction

Count the number of seconds, minutes, hours, and days elapsed.

This version records the start time and computes the number of seconds since start time instead of just counting seconds so it keeps better time.

Demo

elapsed time:

The following tracks the number of minutes since you started viewing this page. Nothing is displayed until a minute has gone by.

elapsed minutes:

Examples

Example 1

The basic usage of the script is:

<script></script>

Or if you are using jQuery:

<script>$( function(){(new ElapsedTimer('elapsed_time')).start();} );</script>

Example 2

The followig example does not tick off the seconds. It only changes every minute. The prefix and suffix is not output until the elapsed time is non-zero, or in other words, not until after a minute has past.

<script></script>

Or if you are using jQuery:

<script>
$( function(){(new ElapsedTimer('elapsed_minutes',{prefix:' You started viewing this page ', suffix:' ago.', show_seconds:false})).start();} );
</script>