summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhong Tran <tranmanphong@gmail.com>2019-06-19 22:08:00 +0700
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2019-06-24 17:39:20 +0900
commit392d28959dc5869eec8cee60bd5d260bf8bb0a1c (patch)
tree92cd6a8949b54e9675ed5edfa0002d4661d0383d
parenta5d580775cbcc5bdac17a8fe5518eeef7f6c96ce (diff)
downloadDLT-daemon-392d28959dc5869eec8cee60bd5d260bf8bb0a1c.tar.gz
dlt-convert: fix warning of wrong conversion
change to use usleep dlt-daemon/src/console/dlt-convert.c:346:35: warning: implicit conversion from 'double' to 'unsigned int' changes value from 0.1 to 0 [-Wliteral-conversion] sleep(0.1); Signed-off-by: Phong Tran <tranmanphong@gmail.com>
-rw-r--r--src/console/dlt-convert.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/console/dlt-convert.c b/src/console/dlt-convert.c
index e709200..373f4d1 100644
--- a/src/console/dlt-convert.c
+++ b/src/console/dlt-convert.c
@@ -343,7 +343,10 @@ int main(int argc, char *argv[])
if (end == (file.counter - 1)) {
/* Sleep if no new message was received */
- sleep(0.1);
+ struct timespec req;
+ req.tv_sec = 0;
+ req.tv_nsec = 100000000;
+ nanosleep(&req, NULL);
}
else {
/* set new end of log file and continue reading */