Re: time
- Posted by Robert Craig <rds at ATTCANADA.NET> Feb 04, 2000
- 463 views
Kat writes: > Errr, i can't find how to set time() in the Eu docs.... is it possible? There's a DOS interrupt for this. See doswrap.e in the Jacques Deschenes Collection. In Windows, Jesus Consuegra has a program in the Archive that sets your computer's time. He gets the time from a special site on the Internet. > Syntax: a = time() > Description: Return the number of seconds since some > fixed point in the past. > > *What* fixed point? You are supposed to use time() to measure differences in time. I don't guarantee that it will always start at 0 on all versions of DOS, Windows and Linux. You can set a variable: start_time = time() and then measure the difference from that. If you want the time of day (to the second), use Euphoria's date() routine. > If someone uses this in dos at 23:59 > after it's started, and calls it again in 20 minutes to time > a duration,, they'll get an error. There's no problem crossing the midnight boundary, but you can't (easily) time something that takes longer than 24 hours. > Can it be reset to 0 in dos or win95? No. Just set start_time = time() again. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com