View Single Post
Old 11-01-2014, 10:52 AM  
SpotOnTechSupport
Confirmed User
 
SpotOnTechSupport's Avatar
 
Industry Role:
Join Date: Mar 2011
Location: Mansfield, Ohio
Posts: 119
Did a bit of searching and came up with this:

Code:
<script type="text/javascript">



function secondize(n)
{
if (n!=0) 
  {
  n= n / 1000;
  }
return n;
}



var timer = {
    init: function() {
        this.startTime = (new Date()).getTime();
        return this;
    },
    stop: function() {
        // returns time difference (in seconds: getSeconds()) between start time and time that this function was called

		var difference = new Date();
		var timeUsed=secondize(difference.setTime((new Date().getTime()) - this.startTime));


		return timeUsed;
    }
};
var count = timer.init();

</script>
__________________
'cuz you're too busy dealing with other stuff to mess around with bad hosting!
Prices start at $2.99 for shared hosting, $80 for managed dedicated!
SpotOnTechSupport is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote