From 9a4bec313bb7be1582c0e76495c31785bf66d3cb Mon Sep 17 00:00:00 2001 From: jval1972 Date: Fri, 22 Apr 2022 10:57:19 +0300 Subject: [PATCH] Displays loading time at startup --- d_main.pas | 7 +++++++ readme.txt | 3 +++ 2 files changed, 10 insertions(+) diff --git a/d_main.pas b/d_main.pas index 99518ca..cc5f1b4 100644 --- a/d_main.pas +++ b/d_main.pas @@ -1366,6 +1366,7 @@ procedure D_DoomMain; filename: string; scale: integer; _time: integer; + startloadingtime: LongWord; s_error: string; i: integer; j: integer; @@ -1373,6 +1374,8 @@ procedure D_DoomMain; err_shown: boolean; s1, s2: string; begin + startloadingtime := I_GetTickCount; + outproc := @I_IOprintf; wadfiles := TDSTringList.Create; @@ -2074,6 +2077,10 @@ procedure D_DoomMain; autostart := true; end; + printf(StringOfChar('-', 21) + #13#10); + printf('Load time: %2.3f secs'#13#10, [(I_GetTickCount - startloadingtime) / 1000]); + printf(StringOfChar('-', 21) + #13#10); + p := M_CheckParm('-playdemo'); if (p <> 0) and (p < myargc - 1) then begin diff --git a/readme.txt b/readme.txt index e2a05c4..03c933e 100644 --- a/readme.txt +++ b/readme.txt @@ -39,6 +39,9 @@ Features: - Custom defined actors (ACTORDEF) History - Change log +-------------------- +Displays loading time at startup. + -------------------- version 1.14.18.134 (20220410) ------------------------------