X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=tests%2Fhello2%2Fhello2.c;h=06639b407c584f26d405338ae2d0007ff0ef8f0b;hb=4bb5ec9b863c8804d9e244ad9a33acaf8036dcb9;hp=836df53c7acb4d899c14954b3b151ba485d88e89;hpb=da485f9c8477cb58da0a5a6ae60195b29a3fbd85;p=ust.git diff --git a/tests/hello2/hello2.c b/tests/hello2/hello2.c index 836df53..06639b4 100644 --- a/tests/hello2/hello2.c +++ b/tests/hello2/hello2.c @@ -1,20 +1,31 @@ #include -#include -#include "marker.h" +#include +#include + +#include + int main() { int i; + struct timespec tv; + int result; -// sleep(1); + tv.tv_sec = 1; + tv.tv_nsec = 0; + + do { + result = nanosleep(&tv, &tv); + } while(result == -1 && errno == EINTR); printf("Hello, World!\n"); for(i=0; i<500; i++) { trace_mark(ust, bar, "str %d", i); trace_mark(ust, bar2, "number1 %d number2 %d", (int)53, (int)9800); - usleep(20); } +// ltt_trace_stop("auto"); +// ltt_trace_destroy("auto"); + return 0; } -MARKER_LIB;