Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileDATE$ TIME$ SETTIME [time$],date$ DATE$=date$ TIME$=time$ TIMER time$, date$: string variable DATE$ returns the system date in the format: DD.MM.YYYY (Day, Month, Year) or MM/DD/YYYY (US format, see MODE) Note: Only years between 1980 and 2079 are allowed. TIME$ returns the system time in the format: HH:MM:SS (Hours, Minutes, Seconds) Note: The time is updated every two seconds. With the instruction SETTIME both the date and time can be set. The strings must have the same format as for TIME$ and DATE$. If SETTIME is given strings in the wrong format, then the current values are not changed. The date and time can also be set individually with DATE$= and TIME$=. TIMER returns the elapsed time in 1/200 of a second since the system was powered up. Examples: PRINT DATE$,TIME$ SETTIME "20:15:30","27.2.1988" PRINT DATE$,TIME$ --> The system date and time are printed, reset, and printed again. t%=TIMER FOR i%=1 to 2500 NEXT i% PRINT (TIMER-t%)/200 --> The time in seconds required for the FOR-NEXT loop is displayed. Memo: t%=TIMER is the same as t%=LPEEK(&H4BA). Returns system timer B. I suppose it's possible the TIMER could roll over eventually, one idea is to use this method: diff%=ABS(TIMER-tsave%) To convert 200th of a second to milliseconds, multiply by 5. TIME$ is returned in 24 hour format, same as GEMDOS(). SETTIME, DATE$=, TIME$= internally calls Gemdos functions: Tsetdate(), Tsettime() DATE$ and TIME$ internally calls Gemdos functions: Tgetdate(), Tgettime() Tgetdate()+, Tgettime()+, Tsetdate()+, Tsettime()+, Gettime()+, Settime()+