BB___TIME

=TIME$= toc

Description
> Returns the **current time** as a string or returns a **numeric value** of time passed since midnight.

> The current time is expressed in 24 hour format and is based on the system clock. e.g. "16:21:44"

> The time passed since midnight is expressed in seconds or milliseconds as specified. This form can be used with math operations.

> See also DATE$

Current time

 * 1) time$

Time passed
> //Note: The time-period parameter (e.g. "seconds") must be all lower case as shown.// > //Any other spelling (e.g. "SECONDS") will cause the function to default to TIME$.//
 * 1) time$("seconds")
 * 2) time$("milliseconds")
 * 3) time$("ms")

Example
code format="lb" ' An example using time$ math to calculate elapsed time: 'get start time startTime = time$("ms")

'do some computations for i = 1 to 40000 x = x + i   next

'get end time endTime=time$("ms")

print "Computations took "; print endTime-startTime; " milliseconds" end code

Useful Functions
code format="lb" ' An example Pause sub: ' (It's OK to use if you aware that this is a "busy loop", it hogs your CPU doing nothing. ' If you don't like this idea, read up on TIMER.) for i = 1 to 3 print i;"..." call Pause 100 ' try changing this value next i end

sub Pause mil t=time$("milliseconds") while time$("milliseconds")<t+mil wend end sub

code