|
@@ -67,6 +67,17 @@ void grpcclient::sendcloudmsg(iv::cloud::cloudmsg &xmsg,std::shared_ptr<::grpc::
|
|
|
request.set_nmsgindex(nmsgindex);
|
|
|
request.set_nmsgtime(std::chrono::system_clock::now().time_since_epoch().count());
|
|
|
double fpingavg,fpingmax,fpingmin,fpingdev;
|
|
|
+ if(xmsg.xclouddata_size()>0)
|
|
|
+ {
|
|
|
+ int64_t nlatency_store = abs(std::chrono::system_clock::now().time_since_epoch().count() - xmsg.xtime());
|
|
|
+ double flatency_store = nlatency_store;
|
|
|
+ flatency_store = flatency_store/1000000.0;
|
|
|
+ request.set_flatencyinstore(flatency_store);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ request.set_flatencyinstore(0.0);
|
|
|
+ }
|
|
|
if(mpCalcPing->GetPingValue(fpingmin,fpingavg,fpingmax,fpingdev))
|
|
|
{
|
|
|
request.set_pingavg(fpingavg);
|