add stopwatch
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "dll_loader.hpp"
|
||||
#include "cmd_client.hpp"
|
||||
#include "stopwatch.hpp"
|
||||
#include <basalt/char_types.hpp>
|
||||
#include <basalt/engine.hpp>
|
||||
#include <basalt/deliver.hpp>
|
||||
@@ -16,6 +17,7 @@ using dll_loader::DllKind;
|
||||
using dll_loader::DllLoader;
|
||||
|
||||
using ::basalt::presenter::cmd_client::CmdClient;
|
||||
using ::basalt::presenter::stopwatch::Stopwatch;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
auto engine_dll = DllLoader(DllKind::Engine, BSTEXT("BasaltDirectX11Engine"));
|
||||
@@ -30,8 +32,10 @@ int main(int argc, char* argv[]) {
|
||||
EngineConfig engine_config{.headless = false, .width = payload.width, .height = payload.height};
|
||||
engine->startup(std::move(engine_config));
|
||||
|
||||
Stopwatch stopwatch(120);
|
||||
while (true) {
|
||||
auto req_stop = engine->tick();
|
||||
stopwatch.tick();
|
||||
auto can_stop = client.tick(req_stop);
|
||||
if (can_stop) break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user