[flang-commits] [flang] [llvm] [flang][flang-rt] Add support for non-standard TIMEF intrinsic (PR #185377)

via flang-commits flang-commits at lists.llvm.org
Mon Mar 30 21:51:12 PDT 2026


================
@@ -31,6 +31,20 @@ TEST(TimeIntrinsics, CpuTime) {
   }
 }
 
+TEST(TimeIntrinsics, Timef) {
+  // We can't really test that we get the "right" result for Timef, but we
+  // can have a smoke test to see that we get something reasonable on the
+  // platforms where we expect to support it.
+  double start{RTNAME(Timef)()};
+  ASSERT_GE(start, 0.0);
+
+  // Loop until we get a different value from Timef
+  for (double end = start; end == start; end = RTNAME(CpuTime)()) {
----------------
NimishMishra wrote:

I have added a sleep now. 

https://github.com/llvm/llvm-project/pull/185377


More information about the flang-commits mailing list