Category : Pascal Source Code
Archive   : PASTOOLS.ZIP
Filename : GETTIME.INC

 
Output of file : GETTIME.INC contained in archive : PASTOOLS.ZIP

const gettime_tag: string[90]
= #0'@(#)CURRENT_FILE LAST_UPDATE Get time of day as real 1.1'#0;
#log Get time of day as a real 1.1

(*
* gettime - get time of day from system clock
*
*)

function get_time: real;
var
reg: regpack;
time: real;
begin
reg.ax := $2c00; (* DOS get time function code *)
msdos( reg );

with reg do
begin
time := int(lo(dx)) / 100.0 + {seconds/100}
int(hi(dx)) + {seconds}
int(lo(cx)) * 60.0 + {minutes}
int(hi(cx)) * 3600.0; {hours}

{writeln(hi(cx),':',lo(cx),':',hi(dx),'.',lo(dx),' ',time:0:2);}
end;

get_time := time;
end;


  3 Responses to “Category : Pascal Source Code
Archive   : PASTOOLS.ZIP
Filename : GETTIME.INC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/