mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 06:00:33 -04:00
import ADV settings, platform files
This commit is contained in:
parent
9b86bed2d8
commit
ccebc91f0d
17 changed files with 244 additions and 14 deletions
18
platform/timer.cpp
Normal file
18
platform/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