Skip to content

Commit 520770e

Browse files
committed
fix incompatible clock use
1 parent 7f797b2 commit 520770e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
260260
{
261261
using namespace obj2voxel;
262262

263-
auto startTime = std::chrono::high_resolution_clock::now();
263+
using clock_type = std::chrono::high_resolution_clock;
264+
auto startTime = clock_type::now();
264265

265266
initLogging();
266267

@@ -344,8 +345,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
344345
strategyArg.Get(),
345346
unitTransform);
346347

347-
i64 nanos =
348-
std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::system_clock::now() - startTime).count();
348+
i64 nanos = std::chrono::duration_cast<std::chrono::nanoseconds>(clock_type::now() - startTime).count();
349349

350350
VXIO_LOG(IMPORTANT, "Done! (" + stringifyTime(static_cast<u64>(nanos), 2) + ')');
351351
}

0 commit comments

Comments
 (0)