[ClavaWeaver] Updates result of the Linux version of test 'Timer'
@@ -7,6 +7,13 @@ double bar() {
return 1.0;
}
+double [bar2() {
+ return 1.0;
+}
+
+double bar3() {
+ return 1.0;
+}
double foo() {
double a = 0;
@@ -30,4 +37,19 @@ int main() {
clock_gettime(CLOCK_MONOTONIC, &clava_timing_end_1);
double clava_timing_duration_1 = ((clava_timing_end_1.tv_sec + ((double) clava_timing_end_1.tv_nsec / 1000000000)) - (clava_timing_start_1.tv_sec + ((double) clava_timing_start_1.tv_nsec / 1000000000))) * (1000);
printf("Time:%fms\n", clava_timing_duration_1);
+
+ struct timespec clava_timing_start_2, clava_timing_end_2;
+ clock_gettime(CLOCK_MONOTONIC, &clava_timing_start_2);
+ bar2();
+ clock_gettime(CLOCK_MONOTONIC, &clava_timing_end_2);
+ double clava_timing_duration_2 = ((clava_timing_end_2.tv_sec + ((double) clava_timing_end_2.tv_nsec / 1000000000)) - (clava_timing_start_2.tv_sec + ((double) clava_timing_start_2.tv_nsec / 1000000000))) * (1000);
+ printf("I want to print the value of the elapsed time (%f), which is in the unit 'ms' and put other stuff after it\n", clava_timing_duration_2);
+
+ struct timespec clava_timing_start_3, clava_timing_end_3;
+ clock_gettime(CLOCK_MONOTONIC, &clava_timing_start_3);
+ bar3();
+ clock_gettime(CLOCK_MONOTONIC, &clava_timing_end_3);
+ double clava_timing_duration_3 = ((clava_timing_end_3.tv_sec + ((double) clava_timing_end_3.tv_nsec / 1000000000)) - (clava_timing_start_3.tv_sec + ((double) clava_timing_start_3.tv_nsec / 1000000000))) * (1000);
+ printf("%fms\n", clava_timing_duration_3);
+ printf("This should appear after the timer print\n"]);
}
