mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Remove time counter
Nobody uses that, and it requires running extra code for each line
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#define MAXMACROARGS 99999
|
||||
#define MAXINCPATHS 128
|
||||
|
||||
extern uint32_t nTotalLines;
|
||||
extern struct Section *pCurrentSection;
|
||||
|
||||
#endif /* RGBDS_ASM_ASM_H */
|
||||
|
||||
@@ -45,9 +45,6 @@ size_t cldefines_bufsize;
|
||||
const size_t cldefine_entrysize = 2 * sizeof(void *);
|
||||
char **cldefines;
|
||||
|
||||
clock_t nStartClock, nEndClock;
|
||||
uint32_t nTotalLines;
|
||||
|
||||
#if defined(YYDEBUG) && YYDEBUG
|
||||
extern int yydebug;
|
||||
#endif
|
||||
@@ -485,9 +482,6 @@ int main(int argc, char *argv[])
|
||||
lexer_Init();
|
||||
fstk_Init(tzMainfile, maxRecursionDepth);
|
||||
|
||||
nStartClock = clock();
|
||||
|
||||
nTotalLines = 0;
|
||||
sym_Init(now);
|
||||
sym_SetExportAll(exportall);
|
||||
|
||||
@@ -503,22 +497,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
sect_CheckUnionClosed();
|
||||
|
||||
double timespent;
|
||||
|
||||
nEndClock = clock();
|
||||
timespent = ((double)(nEndClock - nStartClock))
|
||||
/ (double)CLOCKS_PER_SEC;
|
||||
if (verbose) {
|
||||
printf("Success! %" PRIu32 " lines in %d.%02d seconds ",
|
||||
nTotalLines, (int)timespent,
|
||||
((int)(timespent * 100.0)) % 100);
|
||||
if (timespent < FLT_MIN_EXP)
|
||||
printf("(INFINITY lines/minute)\n");
|
||||
else
|
||||
printf("(%d lines/minute)\n",
|
||||
(int)(60 / timespent * nTotalLines));
|
||||
}
|
||||
|
||||
if (oFailedOnMissingInclude)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -565,9 +565,7 @@ lines : /* empty */
|
||||
| lines {
|
||||
nListCountEmpty = 0;
|
||||
nPCOffset = 0;
|
||||
} line {
|
||||
nTotalLines++;
|
||||
}
|
||||
} line
|
||||
;
|
||||
|
||||
line : label T_NEWLINE
|
||||
|
||||
Reference in New Issue
Block a user