#include <thread>template <typename Duration, typename Function>void timer(Duration const & d, Function const & f){ std::thread([d,f](){ std::this_thread::sleep_for(d); f(); }).detach();}