Skip to content

Commit 23888a4

Browse files
authored
Concurrency: use _BitInt(128) over __int128 (#63300)
Use the `_BitInt` extension from C2a to enable building the Concurrency library on Windows i686. Thanks to @grynspan for the idea!
1 parent 7ea2b4b commit 23888a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/Concurrency/Clock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void swift_get_time(
5050
// count by 1,000,000,000 to get nanosecond resolution. By multiplying
5151
// first, we maintain high precision. The resulting value is the tick
5252
// count in nanoseconds. Use 128-bit math to avoid overflowing.
53-
auto quadPart = static_cast<unsigned __int128>(count.QuadPart);
53+
auto quadPart = static_cast<unsigned _BitInt(128)>(count.QuadPart);
5454
auto ns = (quadPart * 1'000'000'000) / freq.QuadPart;
5555
continuous.tv_sec = ns / 1'000'000'000;
5656
continuous.tv_nsec = ns % 1'000'000'000;

0 commit comments

Comments
 (0)