Commit 832649ce authored by Erik Strand's avatar Erik Strand

Add a countdown so it's easier to record the screen

parent 4e816506
#include "glut_grapher.h"
#include <iostream>
#include <iomanip>
#include <thread>
namespace simucene {
......@@ -77,6 +78,17 @@ void GlutGrapher::display() const {
//..................................................................................................
void GlutGrapher::idle() {
bool const wait_to_start = true;
if (wait_to_start && frame_ == 0) {
std::cout << "Press enter to start a 5 second countdown" << std::endl;
do {} while (std::cin.get() != '\n');
for (uint32_t i = 5; i > 0; --i) {
std::cout << i << "... " << std::flush;
std::this_thread::sleep_for(std::chrono::seconds(1));
}
std::cout << 0 << "... " << std::endl;
}
//std::cout << frame_ << ": ";
//print_vector(state_);
for (uint32_t i = 0; i < 100; ++i) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment