Comparing performance of a task queued to an existing thread vs. new thread for each task.
Révision | 76283aa87338e18208f8e5c157fd481b496202eb (tree) |
---|---|
l'heure | 2017-06-03 09:47:21 |
Auteur | Eric Hopper <hopper@omni...> |
Commiter | Eric Hopper |
auto return type not supported for lambda in C++11.
@@ -13,7 +13,7 @@ | ||
13 | 13 | template <typename T> |
14 | 14 | calls_p_sec_t calls_per_second(const T &thecall, unsigned int interval) |
15 | 15 | { |
16 | - auto now = []() -> auto { | |
16 | + auto now = []() -> decltype(::std::chrono::high_resolution_clock::now()) { | |
17 | 17 | return ::std::chrono::high_resolution_clock::now(); |
18 | 18 | }; |
19 | 19 | typedef ::std::chrono::duration<long double> timediff_t; |