mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- Fix clocking of timer when doing cumulative loads in loaddefinitionsfile()
.
This commit is contained in:
parent
733f4f7aea
commit
6fca2de7f3
1 changed files with 3 additions and 1 deletions
|
@ -2126,12 +2126,12 @@ void loaddefinitionsfile(const char* fn, bool cumulative)
|
||||||
|
|
||||||
cycle_t deftimer;
|
cycle_t deftimer;
|
||||||
deftimer.Reset();
|
deftimer.Reset();
|
||||||
deftimer.Clock();
|
|
||||||
|
|
||||||
auto printtimer = [&](const char* fn)
|
auto printtimer = [&](const char* fn)
|
||||||
{
|
{
|
||||||
deftimer.Unclock();
|
deftimer.Unclock();
|
||||||
DPrintf(DMSG_SPAMMY, "Definitions file \"%s\" loaded, %f ms.\n", fn, deftimer.TimeMS());
|
DPrintf(DMSG_SPAMMY, "Definitions file \"%s\" loaded, %f ms.\n", fn, deftimer.TimeMS());
|
||||||
|
deftimer.Reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!cumulative)
|
if (!cumulative)
|
||||||
|
@ -2140,6 +2140,7 @@ void loaddefinitionsfile(const char* fn, bool cumulative)
|
||||||
if (lump >= 0)
|
if (lump >= 0)
|
||||||
{
|
{
|
||||||
Printf(PRINT_NONOTIFY, "Loading \"%s\"\n", fn);
|
Printf(PRINT_NONOTIFY, "Loading \"%s\"\n", fn);
|
||||||
|
deftimer.Clock();
|
||||||
parseit(lump);
|
parseit(lump);
|
||||||
printtimer(fn);
|
printtimer(fn);
|
||||||
}
|
}
|
||||||
|
@ -2150,6 +2151,7 @@ void loaddefinitionsfile(const char* fn, bool cumulative)
|
||||||
while ((lump = fileSystem.FindLumpFullName(fn, &lastlump)) >= 0)
|
while ((lump = fileSystem.FindLumpFullName(fn, &lastlump)) >= 0)
|
||||||
{
|
{
|
||||||
Printf(PRINT_NONOTIFY, "Loading \"%s\"\n", fileSystem.GetFileFullPath(lump).GetChars());
|
Printf(PRINT_NONOTIFY, "Loading \"%s\"\n", fileSystem.GetFileFullPath(lump).GetChars());
|
||||||
|
deftimer.Clock();
|
||||||
parseit(lump);
|
parseit(lump);
|
||||||
printtimer(fn);
|
printtimer(fn);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue