Skip to content

Commit a220155

Browse files
committed
Report proper max for count_max
After the changes made, we do not rely on std::clock_t anymore, so we can report a much higher limit for the maximum.
1 parent 940bddf commit a220155

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

flang/runtime/time-intrinsic.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,8 @@ count_t GetSystemClockCountRate(int kind, fallback_implementation) {
154154

155155
template <typename Unused = void>
156156
count_t GetSystemClockCountMax(int kind, fallback_implementation) {
157-
constexpr auto max_clock_t{std::numeric_limits<std::clock_t>::max()};
158157
unsigned_count_t maxCount{GetHUGE(kind)};
159-
return max_clock_t <= maxCount ? static_cast<count_t>(max_clock_t)
160-
: static_cast<count_t>(maxCount);
158+
return maxCount;
161159
}
162160

163161
#ifdef CLOCKID_ELAPSED_TIME

0 commit comments

Comments
 (0)