diff options
Diffstat (limited to 'examples/example4/example4.c')
-rw-r--r-- | examples/example4/example4.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/example4/example4.c b/examples/example4/example4.c index 59aef18..afaffe3 100644 --- a/examples/example4/example4.c +++ b/examples/example4/example4.c @@ -56,6 +56,7 @@ int main() { unsigned char buffer[256]; int num; + struct timespec ts; DLT_REGISTER_APP("EXA4", "Fourth Example"); @@ -98,7 +99,9 @@ int main() DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_BIN16")); DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_BIN16(bin16data)); - usleep(1000); + ts.tv_sec = 0; + ts.tv_nsec = 1000000; + nanosleep(&ts, NULL); DLT_UNREGISTER_CONTEXT(con_exa1); |