title: Add delay to code execution in C++
body: <p>Say I need to call a function with 2 seconds delay. In cocos2d-x you can use actions:</p>
  
  <pre><code>auto action = Sequence::create(
      DelayTime::create(2), 
      CallFunc::create(
          [&amp;]() {
              // here is the lambda function that does whatever you want after 2 seconds
          }
      ), 
      NULL
  );
  
  runAction(action);
  </code></pre>
  
  <p>But in order to run the action you need a <code>Node</code>, which in not always available. There are classes that have nothing to do with the <code>Node</code>. <strong>So I wonder what is the cross-platform way of adding delay to code execution in C++11?</strong> </p>