- tracepoint(tp, tptest, i, netint, values, text, strlen(text),
- dbl, flt);
- usleep(nr_usec);
+ tracepoint(tp, tptest, i, netint, values, text,
+ strlen(text), dbl, flt);
+
+ /*
+ * First loop we create the file if asked to indicate
+ * that at least one tracepoint has been hit.
+ */
+ if (after_first_event_file_path && first_event_file_created == 0) {
+ ret = create_file(after_first_event_file_path);
+
+ if (ret != 0) {
+ goto end;
+ } else {
+ first_event_file_created = 1;
+ }
+ }
+
+ if (nr_usec) {
+ if (usleep_safe(nr_usec)) {
+ ret = -1;
+ goto end;
+ }
+ }
+ if (should_quit) {
+ break;
+ }