Skip to content

Commit 9a4bec3

Browse files
committed
Displays loading time at startup
1 parent 3337e28 commit 9a4bec3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

d_main.pas

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,13 +1366,16 @@ procedure D_DoomMain;
13661366
filename: string;
13671367
scale: integer;
13681368
_time: integer;
1369+
startloadingtime: LongWord;
13691370
s_error: string;
13701371
i: integer;
13711372
j: integer;
13721373
episodes: integer;
13731374
err_shown: boolean;
13741375
s1, s2: string;
13751376
begin
1377+
startloadingtime := I_GetTickCount;
1378+
13761379
outproc := @I_IOprintf;
13771380
wadfiles := TDSTringList.Create;
13781381

@@ -2074,6 +2077,10 @@ procedure D_DoomMain;
20742077
autostart := true;
20752078
end;
20762079

2080+
printf(StringOfChar('-', 21) + #13#10);
2081+
printf('Load time: %2.3f secs'#13#10, [(I_GetTickCount - startloadingtime) / 1000]);
2082+
printf(StringOfChar('-', 21) + #13#10);
2083+
20772084
p := M_CheckParm('-playdemo');
20782085
if (p <> 0) and (p < myargc - 1) then
20792086
begin

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ Features:
3939
- Custom defined actors (ACTORDEF)
4040

4141
History - Change log
42+
--------------------
43+
Displays loading time at startup.
44+
4245
--------------------
4346
version 1.14.18.134 (20220410)
4447
------------------------------

0 commit comments

Comments
 (0)