View Single Post
  #5 (permalink)  
Old February 25th, 2004, 05:00 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

VBScript Timer() function returns you the current number of seconds since midnight. I use it all the time in my ASP scripts for really simple "this page loaded in ..." code.

In fact, the Snitz forums uses it too...
Code:
    function StopTimer(x)
        EndTime = Timer

        'Watch for the midnight wraparound...
        if EndTime < StopWatch(x) then
            EndTime = EndTime + (86400)
        end if

        StopTimer = EndTime - StopWatch(x)
    end function


Peter
------------------------------------------------------
Work smarter, not harder.
Reply With Quote