Rip out I_FloatTime from cmdlib.

Use Sys_DoubleTime instead of I_FloatTime and print out ms for compilation
This commit is contained in:
Bill Currie 2001-04-01 03:33:11 +00:00
parent 67368ffc5d
commit 43ea8f4fc0
3 changed files with 4 additions and 33 deletions

View file

@ -49,8 +49,6 @@ extern char **myargv;
int filelength (FILE *f); int filelength (FILE *f);
double I_FloatTime (void);
void Error (char *error, ...); void Error (char *error, ...);
int CheckParm (char *check); int CheckParm (char *check);

View file

@ -77,34 +77,6 @@ Error (char *error, ...)
exit (1); 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 COM_Parse

View file

@ -32,6 +32,7 @@
#endif #endif
#include <QF/crc.h> #include <QF/crc.h>
#include <QF/qendian.h> #include <QF/qendian.h>
#include <QF/sys.h>
#include "qfcc.h" #include "qfcc.h"
@ -741,7 +742,7 @@ main (int argc, char **argv)
int p, crc; int p, crc;
double start, stop; double start, stop;
start = I_FloatTime (); start = Sys_DoubleTime ();
myargc = argc; myargc = argc;
myargv = argv; myargv = argv;
@ -814,7 +815,7 @@ Options: \n\
// write files.dat // write files.dat
WriteFiles (); WriteFiles ();
stop = I_FloatTime (); stop = Sys_DoubleTime ();
printf ("Compilation time: %i seconds.\n", (int) (stop - start)); printf ("Compilation time: %.3f seconds.\n", (stop - start));
return 0; return 0;
} }