Skip to content

Commit

Permalink
fix build?
Browse files Browse the repository at this point in the history
  • Loading branch information
LDAP committed Aug 6, 2024
1 parent cf03291 commit 61ca1fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/merian/vk/shader/shader_hotreloader.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "merian/vk/shader/shader_hotreloader.hpp"

#include <chrono>

namespace merian {

ShaderModuleHandle
Expand All @@ -16,7 +18,7 @@ HotReloader::get_shader(const std::filesystem::path& path,
std::filesystem::last_write_time(*canonical);

if (!shaders.contains(*canonical) ||
(clock_cast<std::chrono::file_clock>(std::chrono::system_clock::now() - 200ms) >
(std::chrono::clock_cast<std::chrono::file_clock>(std::chrono::system_clock::now() - 200ms) >
last_write_time &&
last_write_time > shaders[*canonical].last_write_time)) {
// wait additional 200ms, else the write to the file might still be in process.
Expand Down

0 comments on commit 61ca1fb

Please sign in to comment.