|
|
|
|
|
|
79
|
std::chrono::time_point<std::chrono::system_clock> starttime;
|
79
|
std::chrono::time_point<std::chrono::system_clock> starttime;
|
|
80
|
std::chrono::time_point<std::chrono::system_clock> endtime;
|
80
|
std::chrono::time_point<std::chrono::system_clock> endtime;
|
|
81
|
|
81
|
|
|
|
|
82
|
+ std::chrono::time_point<std::chrono::steady_clock> starterrortime;
|
|
82
|
std::chrono::time_point<std::chrono::steady_clock> startmeastime;
|
83
|
std::chrono::time_point<std::chrono::steady_clock> startmeastime;
|
|
83
|
};
|
84
|
};
|
|
84
|
|
85
|
|
|
|
|
|
|
|
106
|
libconfig::Setting &measurement = root.add ("Measurement", libconfig::Setting::TypeGroup);
|
107
|
libconfig::Setting &measurement = root.add ("Measurement", libconfig::Setting::TypeGroup);
|
|
107
|
|
108
|
|
|
108
|
measurement.add ("StartTime", libconfig::Setting::TypeString) = date::format ("%F %T ", date::make_zoned (date::current_zone(), mp.starttime) ) + date::current_zone()->name();
|
109
|
measurement.add ("StartTime", libconfig::Setting::TypeString) = date::format ("%F %T ", date::make_zoned (date::current_zone(), mp.starttime) ) + date::current_zone()->name();
|
|
|
|
110
|
+ measurement.add ("StartTimeError_ns", libconfig::Setting::TypeInt64) = std::chrono::duration_cast<std::chrono::nanoseconds>(mp.startmeastime-mp.starterrortime).count()/2;
|
|
109
|
measurement.add ("EndTime", libconfig::Setting::TypeString) = date::format ("%F %T ", date::make_zoned (date::current_zone(), mp.endtime) ) + date::current_zone()->name();
|
111
|
measurement.add ("EndTime", libconfig::Setting::TypeString) = date::format ("%F %T ", date::make_zoned (date::current_zone(), mp.endtime) ) + date::current_zone()->name();
|
|
110
|
measurement.add ("RunAsDaemon", libconfig::Setting::TypeBoolean) = mp.demonize;
|
112
|
measurement.add ("RunAsDaemon", libconfig::Setting::TypeBoolean) = mp.demonize;
|
|
111
|
measurement.add ("MaxIntegrationTime_s", libconfig::Setting::TypeInt) = static_cast<int> (mp.maxduration.count() );
|
113
|
measurement.add ("MaxIntegrationTime_s", libconfig::Setting::TypeInt) = static_cast<int> (mp.maxduration.count() );
|
|
|
|
|
|
|
185
|
if (mp.demonize)
|
187
|
if (mp.demonize)
|
|
186
|
sd_notifyf(0, "READY=1\nSTATUS=Processing events…\nMAINPID=%lu", (unsigned long) getpid());
|
188
|
sd_notifyf(0, "READY=1\nSTATUS=Processing events…\nMAINPID=%lu", (unsigned long) getpid());
|
|
187
|
|
189
|
|
|
|
|
190
|
+ mp.starterrortime = std::chrono::steady_clock::now();
|
|
188
|
mp.starttime = std::chrono::system_clock::now();
|
191
|
mp.starttime = std::chrono::system_clock::now();
|
|
189
|
mp.startmeastime = std::chrono::steady_clock::now();
|
192
|
mp.startmeastime = std::chrono::steady_clock::now();
|
|
190
|
|
193
|
|