peerplays-fc/tests/sleep.cpp

18 lines
296 B
C++
Raw Normal View History

2013-08-24 00:36:43 +00:00
#include <fc/thread/thread.hpp>
#include <iostream>
int main( int argc, char** argv )
{
fc::thread test("test");
auto result = test.async( [=]() {
while( true )
{
fc::usleep( fc::microseconds(1000) );
}
});
char c;
std::cin >> c;
test.quit();
return 0;
}