A few changes for mingw port (not done yet)

This commit is contained in:
2023-02-20 16:59:10 -05:00
parent f9aafee165
commit 8e2d37a73a
138 changed files with 49 additions and 25 deletions

View File

@@ -9,6 +9,12 @@
#include <string.h>
#include <iostream>
#if defined(_WIN32)
#include <profileapi.h>
#elif defined(__linux__)
#include <time.h>
#endif
namespace drvutil {
@@ -198,7 +204,7 @@ void strerror_safe(int errnum, char errbuf[256]) {
if (status != 0) {
snprintf(errbuf, 256, "unknown errno %d", errnum);
}
);
}
#endif
@@ -252,7 +258,7 @@ std::string strerror_str(int errnum) {
base_ = qpc();
}
double get() {
return (qpc() - base) * freq_;
return (qpc() - base_) * freq_;
}
};