./
Coverage:
low: ≥ 0%
medium: ≥ 50.0%
high: ≥ 80.0%
Lines:
7 / 9
77.8%
Branches:
1 / 2
50.0%
Functions:
2 / 2
100.0%

kfsw-services/src/fbo/fbo_clock.c
Line Branch Exec Source
1 #include <errno.h>
2 #include <kfsw/platform/wallclock.h>
3 #if CONFIG_KFSW_CSP
4 #include <kfsw/comms/csp.h>
5 #endif
6 #include "fbo_internal.h"
7
8 34 int kfsw_fbo_clock_seconds(int64_t *seconds)
9 {
10 #if CONFIG_KFSW_CSP
11 struct kfsw_csp_clock clock;
12
13 32 kfsw_csp_clock_get(&clock);
14
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 if (!kfsw_csp_clock_is_set(&clock)) {
15 32 return -ENODATA;
16 }
17 ✗ *seconds = clock.seconds;
18 ✗ return 0;
19 #else
20 2 return kfsw_wallclock_get(seconds);
21 #endif
22 }
23
24 34 int kfsw_fbo_schedule_clock_seconds(int64_t *seconds)
25 {
26 34 return kfsw_fbo_clock_seconds(seconds);
27 }
28