I am trying to sleep in Google test. According to this post, I can use the following:
#include <chrono>
#include <thread>
TEST_F(TestSuite, TestOne) {
// f1();
std::this_thread::sleep_for(std::chrono::seconds(2));
// f2();
}
I put this command in the Test, but it does not change anything. Code executes quickly as it omitted the sleep. I am using g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0.
What might I be doing wrong?