summaryrefslogtreecommitdiffstats
path: root/afb-source/ctl-timer.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-23 10:57:13 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:04 +0100
commit57a37d53461a07eebf391f9f3a8b41d7f6fcbdb5 (patch)
tree4b875317fb07ecd733f0b298c2b70b8e1f55f0e2 /afb-source/ctl-timer.c
parent7abfae473d9ecbc7ac5074ef4c443e11852f7c3c (diff)
Format: Remove spaces at EOL
Change-Id: I50bbf17cfa913b40caf0cb6752a902fb626ec1ad Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'afb-source/ctl-timer.c')
-rw-r--r--afb-source/ctl-timer.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/afb-source/ctl-timer.c b/afb-source/ctl-timer.c
index a826f9f..50e181b 100644
--- a/afb-source/ctl-timer.c
+++ b/afb-source/ctl-timer.c
@@ -45,7 +45,7 @@ STATIC int TimerNext (sd_event_source* source, uint64_t timer, void* handle) {
return 0;
}
else {
- // otherwise validate timer for a new run
+ // otherwise validate timer for a new run
sd_event_now(afb_daemon_get_event_loop(), CLOCK_MONOTONIC, &usec);
sd_event_source_set_enabled(source, SD_EVENT_ONESHOT);
sd_event_source_set_time(source, usec + timerHandle->delay*1000);
@@ -53,12 +53,12 @@ STATIC int TimerNext (sd_event_source* source, uint64_t timer, void* handle) {
done= timerHandle->callback(timerHandle->context);
if (!done) goto OnErrorExit;
-
+
return 0;
OnErrorExit:
AFB_WARNING("TimerNext Callback Fail Tag=%s", timerHandle->label);
- return -1;
+ return -1;
}
PUBLIC void TimerEvtStop(TimerHandleT *timerHandle) {
@@ -70,12 +70,12 @@ PUBLIC void TimerEvtStop(TimerHandleT *timerHandle) {
PUBLIC void TimerEvtStart(TimerHandleT *timerHandle, timerCallbackT callback, void *context) {
uint64_t usec;
-
+
// populate CB handle
timerHandle->callback=callback;
timerHandle->context=context;
-
- // set a timer with ~250us accuracy
+
+ // set a timer with ~250us accuracy
sd_event_now(afb_daemon_get_event_loop(), CLOCK_MONOTONIC, &usec);
sd_event_add_time(afb_daemon_get_event_loop(), &timerHandle->evtSource, CLOCK_MONOTONIC, usec+timerHandle->delay*1000, 250, TimerNext, timerHandle);
}
@@ -87,15 +87,15 @@ PUBLIC afb_event TimerEvtGet(void) {
// Create Binding Event at Init
PUBLIC int TimerEvtInit () {
-
+
// create binder event to send test pause/resume
afbevt = afb_daemon_make_event("control");
if (!afb_event_is_valid(afbevt)) {
AFB_ERROR ("POLCTL_INIT: Cannot register ctl-events");
return 1;
}
-
+
AFB_DEBUG ("Audio Control-Events Init Done");
return 0;
}
-
+