mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fix compilation issues that occur when building with bazel (#6008)
This commit is contained in:
@@ -367,12 +367,12 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
#ifdef _WIN32
|
||||
TIMECAPS tc;
|
||||
if (timeGetDevCaps(&tc, sizeof(tc)) == TIMERR_NOERROR) {
|
||||
UINT target = min(1, tc.wPeriodMin);
|
||||
UINT target = (std::min)(static_cast<UINT>(1), tc.wPeriodMin);
|
||||
timeBeginPeriod(target);
|
||||
std::atexit([]() {
|
||||
TIMECAPS tc;
|
||||
if (timeGetDevCaps(&tc, sizeof(tc)) == TIMERR_NOERROR) {
|
||||
UINT target = min(1, tc.wPeriodMin);
|
||||
UINT target = (std::min)(static_cast<UINT>(1), tc.wPeriodMin);
|
||||
timeEndPeriod(target);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user