46 {
47 if (!msg->has_localization()) {
48 return;
49 }
50
51 ClientContext context;
52 gpr_timespec timespec;
53 timespec.tv_sec = 0;
54 timespec.tv_nsec = car_status_tv_nsec_;
55 timespec.clock_type = GPR_TIMESPAN;
56 context.set_deadline(timespec);
57 UpdateStatus response;
58
59
60 auto start = std::chrono::steady_clock::now();
61 Status status = stub_->PushCarStatus(&context, *msg, &response);
62 auto end = std::chrono::steady_clock::now();
63 std::chrono::duration<double> time_used = end - start;
64
65
66 AINFO <<
"stub PushCarStatus Time used: " << time_used.count() * 1000
67 << " ms";
68}