move Timer class to header, use it in q3map2

This commit is contained in:
Garux
2021-11-04 17:25:04 +03:00
parent 4016d64859
commit d1610b49ff
11 changed files with 66 additions and 135 deletions

View File

@@ -34,9 +34,6 @@
#include "qpathops.h"
#include "stream/stringstream.h"
#include "stream/textstream.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <ctime>
#include <cerrno>
#include <filesystem>
@@ -83,34 +80,6 @@ char *ExpandArg( const char *path ){
/*
================
I_FloatTime
================
*/
double I_FloatTime(){
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
}
void Q_getwd( char *out ){
#ifdef WIN32
_getcwd( out, 256 );