pangtao22/quasistatic_simulator

Build Error -- sleep_for Not Defined

Closed this issue · 0 comments

cohnt commented

When I try to build the simulator (following the instructions of the build script), I get the following compile error:

quasistatic_simulator/quasistatic_simulator_cpp/src/batch_quasistatic_simulator.cc:437:23: error: ‘sleep_for’ is not a member of ‘std::this_thread’
  437 |     std::this_thread::sleep_for(std::chrono::milliseconds(n_samples));
      |                       ^~~~~~~~~

Adding #include <thread> to the top of batch_quasistatic_simulator.cc fixed this problem, as suggested by this comment.