File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/plugins/process/tcpRtt/src Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 13
13
#include < limits>
14
14
#include < memory>
15
15
#include < sstream>
16
+ #include < chrono>
16
17
17
18
#include < ipfixprobe/flowifc.hpp>
18
19
#include < ipfixprobe/ipfix-basiclist.hpp>
24
25
#include " fields.h"
25
26
#endif
26
27
28
+ using namespace std ::chrono_literals;
29
+
27
30
namespace ipxp {
28
31
29
32
#define TCPRTT_UNIREC_TEMPLATE " TCPRTT_TIME"
@@ -36,8 +39,8 @@ UR_FIELDS(uint64 TCPRTT_TIME)
36
39
*/
37
40
constexpr static inline uint64_t timeval_to_msec (timeval timeval) noexcept
38
41
{
39
- constexpr size_t MSEC_IN_SEC = 1'000 ;
40
- constexpr size_t USEC_IN_MSEC = 1'000 ;
42
+ constexpr std:: size_t MSEC_IN_SEC = std::chrono::milliseconds (1s). count () ;
43
+ constexpr std:: size_t USEC_IN_MSEC = std::chrono::microseconds (1ms). count () ;
41
44
return timeval.tv_sec * MSEC_IN_SEC + timeval.tv_usec / USEC_IN_MSEC;
42
45
}
43
46
You can’t perform that action at this time.
0 commit comments