diff options
author | Phong Tran <tranmanphong@gmail.com> | 2019-06-19 22:08:00 +0700 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2019-06-24 17:39:20 +0900 |
commit | 392d28959dc5869eec8cee60bd5d260bf8bb0a1c (patch) | |
tree | 92cd6a8949b54e9675ed5edfa0002d4661d0383d /src/console | |
parent | a5d580775cbcc5bdac17a8fe5518eeef7f6c96ce (diff) | |
download | DLT-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>
Diffstat (limited to 'src/console')
-rw-r--r-- | src/console/dlt-convert.c | 5 |
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 */ |