[flang-commits] [flang] [flang] Add ETIME runtime and lowering intrinsics implementation (PR #90578)
jiajie zhang via flang-commits
flang-commits at lists.llvm.org
Tue Apr 30 20:50:38 PDT 2024
================
@@ -370,5 +374,69 @@ void RTNAME(DateAndTime)(char *date, std::size_t dateChars, char *time,
terminator, date, dateChars, time, timeChars, zone, zoneChars, values);
}
+void RTNAME(Etime)(const Descriptor *values, const Descriptor *time,
+ const char *sourceFile, int line) {
+ Fortran::runtime::Terminator terminator{sourceFile, line};
+
+ double usrTime = -1.0, sysTime = -1.0, realTime = -1.0;
+
+#ifdef _WIN32
+ FILETIME creationTime;
+ FILETIME exitTime;
+ FILETIME kernelTime;
+ FILETIME userTime;
+
+ if (GetProcessTimes(GetCurrentProcess(), &creationTime, &exitTime,
+ &kernelTime, &userTime) != -1) {
----------------
JumpMasterJJ wrote:
It is indeed a mistake. I'll fix it.
https://github.com/llvm/llvm-project/pull/90578
More information about the flang-commits
mailing list