Browse Source

添加分站时间偏移统计日志

zzj 6 years ago
parent
commit
011edc85ad
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ant.h

+ 2 - 1
ant.h

@@ -126,6 +126,7 @@ struct site:point,std::enable_shared_from_this<site>
     bool m_path_empty;
 
 	std::array<int,32>	m_timeoff_count;
+	int  m_package_count=0;
 
     site(int id=-1);
 	bool check_timestamp(const char*tm_buf)
@@ -161,7 +162,7 @@ struct site:point,std::enable_shared_from_this<site>
 
 		m_timeoff_count[off]++;
 
-		if(now % 300 ==0 )
+		if(m_package_count++ % 300 ==0 )
 		{
 			std::ostringstream stm;
 			for(uint32_t i=0;i<m_timeoff_count.size();i++)