X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=tests%2Fhello2%2Fhello2.c;h=bd3856cb810039036415cd0b45f82bc338e3feae;hb=ff1fedb9f2e8fcf9f99d57c2adaeac00308404fd;hp=f9bebce2676bb5dbd25a95983fdfcf86736d56e2;hpb=6dd969b5dd702909b8eb827e850c851053774055;p=lttng-ust.git diff --git a/tests/hello2/hello2.c b/tests/hello2/hello2.c index f9bebce2..bd3856cb 100644 --- a/tests/hello2/hello2.c +++ b/tests/hello2/hello2.c @@ -1,21 +1,31 @@ #include -#include +#include +#include + #include "marker.h" int main() { - int result; 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;