[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / openmp / runtime / test / api / omp_get_wtime.c
blob2c8fb5f11594e548705687a27480d9b81c1ce025
1 // RUN: %libomp-compile-and-run
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include "omp_testsuite.h"
5 #include "omp_my_sleep.h"
7 #define NTIMES 100
9 #define ASSERT_CMP(lhs, cmp, rhs) \
10 if (!((lhs)cmp(rhs))) { \
11 printf("Expected: (" #lhs ") " #cmp " (" #rhs "), actual: %e vs. %e", lhs, \
12 rhs); \
13 return EXIT_FAILURE; \
16 int main() {
17 int i;
19 for (i = 0; i < NTIMES; i++) {
20 double start = omp_get_wtime(), end;
21 ASSERT_CMP(start, >=, 0.0);
22 for (end = omp_get_wtime(); end == start; end = omp_get_wtime()) {
23 ASSERT_CMP(end, >=, 0.0);
25 ASSERT_CMP(end, >=, 0.0);
26 ASSERT_CMP(end, >, start);
29 return EXIT_SUCCESS;