X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=tests%2Fhello2%2Fhello2.c;h=bd3856cb810039036415cd0b45f82bc338e3feae;hb=3158b808d3a8c45995ac7a40b022f9d569290b49;hp=836df53c7acb4d899c14954b3b151ba485d88e89;hpb=da485f9c8477cb58da0a5a6ae60195b29a3fbd85;p=lttng-ust.git diff --git a/tests/hello2/hello2.c b/tests/hello2/hello2.c index 836df53c..bd3856cb 100644 --- a/tests/hello2/hello2.c +++ b/tests/hello2/hello2.c @@ -1,20 +1,31 @@ #include -#include +#include +#include + #include "marker.h" int main() { int i; + struct timespec tv; + int result; + + tv.tv_sec = 1; + tv.tv_nsec = 0; -// sleep(1); + 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;