...

StopWatch class

beetle
03-05-2003, 09:34 PM
Nothing super special here. I just added a StopWatch Class to my growing collection of javascript classes (http://www.peterbailey.net/site/dev/jsclasses/)

Basic operation
This let's you time javascript processes with intuitive method names like start(), stop(), read(), and reset(). I used these basic methods to make a rough bandwidth test (http://www.peterbailey.net/test/bandwidth.htm)

Advanced features
You can also save individual results and have them reported back as a group or individually. You can also retrieve saved elapsed times individually. I made a demo for these features here (http://www.peterbailey.net/test/stopwatch.htm) and here (http://www.peterbailey.net/test/stopwatch2.htm)

I know this is useful in only a handful of applications, but I found it useful enough for just one that I thought I'd share it :D

Let me know what you think, good or bad.

Saj
03-07-2003, 03:35 PM
I dunno why its doing this, but the bandwidth thing if funny I think. I have a cable connection and it came back saying my bandwidth was 6750 kb/s.

Mind you, that was the first time i visited the page, so it didn't come from the cache.

beetle
03-07-2003, 04:02 PM
Hm, that is odd. Not sure why.

What browser you got?

Saj
03-12-2003, 02:57 PM
I use IE6, but it also comes up in NS7

Spookster
03-12-2003, 03:17 PM
It says my cable connection is at 8100 kb/s -->IE6 and Mozilla 1.2.1

beetle
03-12-2003, 03:59 PM
Okay, well, apparently the method I used to confirm the completion of the downloaded image isn't nearly consistent enough to be viable. However, I did just finish making another demo page (http://www.peterbailey.net/test/stopwatch2.htm) for this class.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum