Displaying 1 result from an estimated 1 matches for "posix_tim".
Did you mean:
  posix_time
  
2013 Nov 03
1
How to make an R package that uses Boost.Thread, qualified to be published on CRAN or shared by the most
...----------
#include "rcpp_hello_world.h"
#include "boost/lambda/lambda.hpp"
#include <iostream>
#include <iterator>
#include <algorithm>
#include <vector>
#include "boost/thread.hpp"
void wait(int seconds) {
  boost::this_thread::sleep(boost::posix_time::seconds(seconds));
}
void thread() {
  for (int i = 0; i < 5; i++) {
    wait(1);
    std::cout << i << std::endl;
  }
}
SEXP rcpp_hello_world(){
    using namespace Rcpp ;
    using namespace boost::lambda;
    std::vector<int> a;
    a.push_back(1);
    a.push_back(2);
/...