File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -235,28 +235,28 @@ static uint32_t crash_free_hours = 0
235
235
static uint32_t operational_seconds = 0
236
236
237
237
void metrics_on_second__callback (void) {
238
- time_without_crash++;
238
+ time_without_crash++;
239
239
if (time_without_crash >= 3600) {
240
- crashfree_hours++
241
- time_without_crash = 0
240
+ crashfree_hours++
241
+ time_without_crash = 0
242
242
}
243
243
}
244
244
245
245
void metrics_on_crash__ callback(void) {
246
- time_without_crash = 0;
246
+ time_without_crash = 0;
247
247
}
248
248
249
249
void metrics_on_shutdown__ callback(void) {
250
250
// Since it's not a crash, we'll save
251
251
// the value for the next boot
252
- persisted_time_without_crash = time_without_crash;
252
+ persisted_time_without_crash = time_without_crash;
253
253
}
254
254
255
255
void metrics_on_heartbeat__ callback(void) {
256
- heartbeat.operational_hours = floor(operational_seconds / 3600);
257
- operational_seconds = operational_seconds % 3600;
256
+ heartbeat.operational_hours = floor(operational_seconds / 3600);
257
+ operational_seconds = operational_seconds % 3600;
258
258
heartbeat.crash_free_hours = crash_free_hours;
259
- crash_free_hours = 0;
259
+ crash_free_hours = 0;
260
260
261
261
// serialize and send metrics
262
262
})
You can’t perform that action at this time.
0 commit comments