Skip to content
Snippets Groups Projects

shell_run

Merged Recolic requested to merge tmp_shell_run into master
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
  • 5fb20249
    . · 5fb20249
    Recolic authored
+ 1
1
@@ -48,7 +48,7 @@ namespace rlib {
@@ -48,7 +48,7 @@ namespace rlib {
return std::chrono::duration<double>(end - begin).count();
return std::chrono::duration<double>(end - begin).count();
}
}
template <typename Func, typename... Args>
template <typename Func, typename... Args>
static inline auto timeout(double timeout_seconds, Func&& func, Args&&... args) {
static inline auto timeout(int timeout_seconds, Func&& func, Args&&... args) {
using ReturnType = decltype(func(args...));
using ReturnType = decltype(func(args...));
auto future = std::async(std::launch::async, std::forward<Func>(func), std::forward<Args>(args)...);
auto future = std::async(std::launch::async, std::forward<Func>(func), std::forward<Args>(args)...);
Loading