summaryrefslogtreecommitdiff
path: root/src/rt-app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt-app.c')
-rw-r--r--src/rt-app.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rt-app.c b/src/rt-app.c
index e3aece8..2627d58 100644
--- a/src/rt-app.c
+++ b/src/rt-app.c
@@ -611,6 +611,16 @@ void *thread_body(void *arg)
}
}
#endif
+
+ if (data->delay > 0) {
+ struct timespec delay = usec_to_timespec(data->delay);
+
+ log_debug("initial delay %d ", data->delay);
+ t_first = timespec_add(&t_first, &delay);
+ clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &t_first,
+ NULL);
+ }
+
i = j = loop = idx = 0;
while (continue_running && (i != data->loop)) {