mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 05:20:05 +00:00
Fix social distancing bug (name trademarked by kamilprzyb)
This commit is contained in:
parent
266ca8b8c6
commit
589da3f714
@ -1,4 +1,7 @@
|
|||||||
#include "CNStructs.hpp"
|
#include "CNStructs.hpp"
|
||||||
|
#if defined _MSC_VER
|
||||||
|
#include <chrono>
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string U16toU8(char16_t* src) {
|
std::string U16toU8(char16_t* src) {
|
||||||
try {
|
try {
|
||||||
@ -27,8 +30,7 @@ uint64_t getTime() {
|
|||||||
gettimeofday(&tp, NULL);
|
gettimeofday(&tp, NULL);
|
||||||
return tp.tv_sec * 1000 + tp.tv_usec / 1000;
|
return tp.tv_sec * 1000 + tp.tv_usec / 1000;
|
||||||
#else
|
#else
|
||||||
time_t t;
|
std::chrono::milliseconds value = std::chrono::duration_cast<std::chrono::milliseconds>((std::chrono::time_point_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now())).time_since_epoch());
|
||||||
time(&t);
|
return (uint64_t)(value.count());
|
||||||
return (uint64_t)t;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user