VBScript

Timer Function Example

The status bar shows (in the bottom left-hand corner of the window) the timer function which returns the number of seconds since 00:00:00 (midnight).

<!--
sub window_onload()
statuscounter()
end sub
sub statuscounter()
x = timer()
window.status = x
timer1 = window.settimeout("statuscounter()", 100)
end sub
-->
</script>

The touch typing tester uses this to calculate the time taken to type the sentence. The only problem with this occurs if the test is started before midnight and completed after midnight.

Notice that we have included a line in the script that checks for this and adds 86400 seconds to the result if midnight has passed.



Kathie Kingsley-Hughes
Last updated: May 4th 2004
Print This Page   |   Email me when this page changes    |  Search This Site



Crucial.com System Scanner does the work for you!



/a_global/close_links.inc"); ?>

Contact Us