Skip to content

Commit 3edecb3

Browse files
authored
Fix code formatting (#397)
1 parent 75f7a1a commit 3edecb3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

_posts/2023-11-08-device-reliability-metrics.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,28 +235,28 @@ static uint32_t crash_free_hours = 0
235235
static uint32_t operational_seconds = 0
236236

237237
void metrics_on_second__callback(void) {
238-
time_without_crash++;
238+
time_without_crash++;
239239
if (time_without_crash >= 3600) {
240-
crashfree_hours++
241-
time_without_crash = 0
240+
crashfree_hours++
241+
time_without_crash = 0
242242
}
243243
}
244244

245245
void metrics_on_crash__callback(void) {
246-
time_without_crash = 0;
246+
time_without_crash = 0;
247247
}
248248

249249
void metrics_on_shutdown__callback(void) {
250250
// Since it's not a crash, we'll save
251251
// the value for the next boot
252-
persisted_time_without_crash = time_without_crash;
252+
persisted_time_without_crash = time_without_crash;
253253
}
254254

255255
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;
258258
heartbeat.crash_free_hours = crash_free_hours;
259-
crash_free_hours = 0;
259+
crash_free_hours = 0;
260260

261261
// serialize and send metrics
262262
})

0 commit comments

Comments
 (0)