From ca50b9d7f34b5645cdfdf57522bf372e752eb611 Mon Sep 17 00:00:00 2001 From: XieHan Date: Thu, 18 Feb 2021 23:04:56 +0800 Subject: [PATCH] move a macro to cpp --- src/nameservice/ServiceGovernance.cc | 2 ++ src/nameservice/ServiceGovernance.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nameservice/ServiceGovernance.cc b/src/nameservice/ServiceGovernance.cc index d6ae2d6d..bf83b120 100644 --- a/src/nameservice/ServiceGovernance.cc +++ b/src/nameservice/ServiceGovernance.cc @@ -24,6 +24,8 @@ #include "ServiceGovernance.h" #include "UpstreamManager.h" +#define GET_CURRENT_SECOND std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count() + #define DNS_CACHE_LEVEL_1 1 #define DNS_CACHE_LEVEL_2 2 diff --git a/src/nameservice/ServiceGovernance.h b/src/nameservice/ServiceGovernance.h index fa6e6e5b..a12f4b0f 100644 --- a/src/nameservice/ServiceGovernance.h +++ b/src/nameservice/ServiceGovernance.h @@ -33,8 +33,6 @@ #define MTTR_SECOND_DEFAULT 30 #define VIRTUAL_GROUP_SIZE 16 -#define GET_CURRENT_SECOND std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count() - struct AddressParams { struct EndpointParams endpoint_params; ///< Connection config