mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Platform.h almost done
This commit is contained in:
parent
4b7ee6abe5
commit
0133d9c108
2 changed files with 0 additions and 20 deletions
|
@ -36,13 +36,6 @@ void dbg_hit_on_c(bool c, bool b);
|
||||||
void dbg_mean_of(int v);
|
void dbg_mean_of(int v);
|
||||||
void dbg_print();
|
void dbg_print();
|
||||||
|
|
||||||
|
|
||||||
namespace Time {
|
|
||||||
typedef int64_t point;
|
|
||||||
inline point now() { return system_time_to_msec(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Entry, int Size>
|
template<class Entry, int Size>
|
||||||
struct HashTable {
|
struct HashTable {
|
||||||
HashTable() : table(Size, Entry()) {}
|
HashTable() : table(Size, Entry()) {}
|
||||||
|
|
|
@ -22,17 +22,4 @@
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
#ifndef _WIN32 // Linux - Unix
|
|
||||||
|
|
||||||
# include <sys/time.h>
|
|
||||||
|
|
||||||
inline int64_t system_time_to_msec() {
|
|
||||||
timeval t;
|
|
||||||
gettimeofday(&t, NULL);
|
|
||||||
return t.tv_sec * 1000LL + t.tv_usec / 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else // Windows and MinGW
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // #ifndef PLATFORM_H_INCLUDED
|
#endif // #ifndef PLATFORM_H_INCLUDED
|
||||||
|
|
Loading…
Add table
Reference in a new issue