Re: Elapsed Time
by "Cyanide _7" <leo7278(at)hotmail.com>
|
Date: |
Tue, 21 Mar 2000 22:35:26 CST |
To: |
Douglass.Franklin(at)ssa.gov |
Cc: |
hwg-languages(at)hwg.org |
|
todo: View
Thread,
Original
|
|
use the Date object. when no parameters are sent to the constructor, it uses
the current time and date settings of the client machine. new a Date object
and snag its time, then do the same latter to freeze that instance in time.
take the difference and you have the elapsed time in milliseconds. try this
script to roughly show a page's rendering time:
<script>
var start = (new Date()).getTime();
function onload(){
var elapsed = (new Date()).getTime() - start;
alert("Page rendered in " + elapsed + " milliseconds.");
}
</script>
- Cyanide_7
>
>Would someone share some insight on how to calculate elapsed time? I have
>a
>working clock, but I find it difficult to "freeze" a static time to use as
>a
>reference point.
>
>TIA,
>- Doug
>
>Doug Franklin
>Social Security Administration
>Office of International Operations
>Module 1
>Benefit Authorizer
>Site LAN Coordinator
>Site Training Coordinator
>(410) 966-3735
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA