summaryrefslogtreecommitdiff
path: root/src/console/dlt-control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/dlt-control.c')
-rw-r--r--src/console/dlt-control.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/console/dlt-control.c b/src/console/dlt-control.c
index a1eb408..19e4b36 100644
--- a/src/console/dlt-control.c
+++ b/src/console/dlt-control.c
@@ -232,6 +232,7 @@ int main(int argc, char *argv[])
int c;
int index;
char *endptr = NULL;
+ struct timespec ts;
/* Initialize dltdata */
dltdata.vflag = 0;
@@ -641,7 +642,9 @@ int main(int argc, char *argv[])
/*dlt_client_main_loop(&dltclient, &dltdata, dltdata.vflag); */
/* Wait timeout */
- usleep(dltdata.tvalue * 1000);
+ ts.tv_sec = (dltdata.tvalue * NANOSEC_PER_MILLISEC) / NANOSEC_PER_SEC;
+ ts.tv_nsec = (dltdata.tvalue * NANOSEC_PER_MILLISEC) % NANOSEC_PER_SEC;
+ nanosleep(&ts, NULL);
}
/* Dlt Client Cleanup */