diff --git a/include/opendht/utils.h b/include/opendht/utils.h index 205ac4efabe9520abcd5607feae689af09cfe720..da56ffe0c2484aeb754f355bc10fd2b1e67151df 100644 --- a/include/opendht/utils.h +++ b/include/opendht/utils.h @@ -68,6 +68,9 @@ using duration = clock::duration; time_point from_time_t(std::time_t t); std::time_t to_time_t(time_point t); +/** + * Converts std::chrono::duration to floating-point seconds. + */ template <class DT> static double print_dt(DT d) { diff --git a/tools/tools_common.h b/tools/tools_common.h index 9c64be2207c8d2363d0df2354ffbc940f3009e2d..e9cc9362106fed8dbe98f6e2c5f2cc0dfd8347ed 100644 --- a/tools/tools_common.h +++ b/tools/tools_common.h @@ -112,15 +112,6 @@ disableLogging(dht::DhtRunner& dht) dht.setLoggers(dht::NOLOG, dht::NOLOG, dht::NOLOG); } -/** - * Converts std::chrono::duration to floating-point seconds. - */ -/*template <class DT> -static double -print_dt(DT d) { - return std::chrono::duration_cast<std::chrono::duration<double>>(d).count(); -}*/ - /** * Split "[host]:port" or "host:port" to pair<"host", "port">. */