summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f45fb24..71e47be 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -16,7 +16,7 @@ along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
*/
#include "common.hpp"
-#include <ctime>
+#include <chrono>
bool debug_draw_cmodels = false;
bool debug_draw_paths = false;
@@ -26,10 +26,7 @@ render::state_t *debug_render;
uint64_t nano_clock(void)
{
- struct timespec ts;
-
- clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
- return ts.tv_sec * 1000000000LLU + ts.tv_nsec;
+ return std::chrono::high_resolution_clock::now().time_since_epoch() / std::chrono::nanoseconds(1);
}
int main()