home *** CD-ROM | disk | FTP | other *** search
- {
- FUNCTION Time
-
- Source: "TIME: A Function To Measure Elapsed Time", TUG Lines Volume I Issue 3
- Author: Herb Holden
- Application: PC-DOS/MS-DOS
- }
-
-
- Function time: real ; (* HLH 6/6/84 *)
- Type registers = record
- ax,bx,cx,dx: integer
- end ;
-
- var r:registers ;
- begin
- r.ax := $2C00 ;
- intr($21,r) ;
- with r do
- time:= (cx shr 8)*3600+(cx and $00FF )*60
- +(dx shr 8) +(dx and $00FF) /100 ;
- end;
-
- {Note: cx and $00FF is substantially faster than cx mod 256!}