mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 06:00:33 -04:00
trying to debug, additional rewrites
This commit is contained in:
parent
378b5586ab
commit
42f780a729
87 changed files with 1771 additions and 529 deletions
18
platform/linux/timer.cpp
Normal file
18
platform/linux/timer.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "timer.h"
|
||||
#include <chrono>
|
||||
#include "../platform.h"
|
||||
|
||||
#include <thread>
|
||||
int get_timer_value() {
|
||||
auto n = std::chrono::steady_clock::now();
|
||||
return std::chrono::duration_cast<std::chrono::milliseconds>(n.time_since_epoch()).count()/TIMERSPEED;
|
||||
}
|
||||
|
||||
uint32_t get_game_tick_count() {
|
||||
auto n = std::chrono::steady_clock::now();
|
||||
return std::chrono::duration_cast<std::chrono::milliseconds>(n.time_since_epoch()).count();
|
||||
}
|
||||
|
||||
void sleep_ms(uint32_t x) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(x));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue