A few changes for mingw port (not done yet)
This commit is contained in:
@@ -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_;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user