Skip to content

Commit

Permalink
fix incompatible clock use
Browse files Browse the repository at this point in the history
  • Loading branch information
Eisenwave committed Mar 17, 2021
1 parent 7f797b2 commit 520770e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
{
using namespace obj2voxel;

auto startTime = std::chrono::high_resolution_clock::now();
using clock_type = std::chrono::high_resolution_clock;
auto startTime = clock_type::now();

initLogging();

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

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

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

0 comments on commit 520770e

Please sign in to comment.