mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 08:00:51 +00:00
Rip out I_FloatTime from cmdlib.
Use Sys_DoubleTime instead of I_FloatTime and print out ms for compilation
This commit is contained in:
parent
67368ffc5d
commit
43ea8f4fc0
3 changed files with 4 additions and 33 deletions
|
@ -49,8 +49,6 @@ extern char **myargv;
|
|||
|
||||
int filelength (FILE *f);
|
||||
|
||||
double I_FloatTime (void);
|
||||
|
||||
void Error (char *error, ...);
|
||||
int CheckParm (char *check);
|
||||
|
||||
|
|
|
@ -77,34 +77,6 @@ Error (char *error, ...)
|
|||
exit (1);
|
||||
}
|
||||
|
||||
/*
|
||||
I_FloatTime
|
||||
*/
|
||||
double
|
||||
I_FloatTime (void)
|
||||
{
|
||||
time_t t;
|
||||
|
||||
time (&t);
|
||||
|
||||
return t;
|
||||
#if 0
|
||||
// more precise, less portable
|
||||
struct timeval tp;
|
||||
struct timezone tzp;
|
||||
static int secbase;
|
||||
|
||||
gettimeofday (&tp, &tzp);
|
||||
|
||||
if (!secbase) {
|
||||
secbase = tp.tv_sec;
|
||||
return tp.tv_usec / 1000000.0;
|
||||
}
|
||||
|
||||
return (tp.tv_sec - secbase) + tp.tv_usec / 1000000.0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
COM_Parse
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#endif
|
||||
#include <QF/crc.h>
|
||||
#include <QF/qendian.h>
|
||||
#include <QF/sys.h>
|
||||
|
||||
#include "qfcc.h"
|
||||
|
||||
|
@ -741,7 +742,7 @@ main (int argc, char **argv)
|
|||
int p, crc;
|
||||
double start, stop;
|
||||
|
||||
start = I_FloatTime ();
|
||||
start = Sys_DoubleTime ();
|
||||
|
||||
myargc = argc;
|
||||
myargv = argv;
|
||||
|
@ -814,7 +815,7 @@ Options: \n\
|
|||
// write files.dat
|
||||
WriteFiles ();
|
||||
|
||||
stop = I_FloatTime ();
|
||||
printf ("Compilation time: %i seconds.\n", (int) (stop - start));
|
||||
stop = Sys_DoubleTime ();
|
||||
printf ("Compilation time: %.3f seconds.\n", (stop - start));
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue