summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltimer.cpp
diff options
context:
space:
mode:
authorLars Næsbye Christensen <lars@naesbye.dk>2024-02-08 02:51:51 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-09 01:02:29 +0200
commitba4e7b989b6c20a49da0eeb450bd2f945b3eefc6 (patch)
tree19c7509e61e002bec8f7ee74e8c0a05100cc4f24 /indra/llcommon/lltimer.cpp
parent2d9e00eff5ca1e526351e77800dc3abdf4ff9b68 (diff)
llcommon: BOOL (int) to real bool/LSTATUS
Diffstat (limited to 'indra/llcommon/lltimer.cpp')
-rw-r--r--indra/llcommon/lltimer.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index 1a99ac2886..42c4911ff1 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -96,7 +96,7 @@ U32 micro_sleep(U64 us, U32 max_yields)
LARGE_INTEGER ft;
ft.QuadPart = -static_cast<S64>(us * 10); // '-' using relative time
- HANDLE timer = CreateWaitableTimer(NULL, TRUE, NULL);
+ HANDLE timer = CreateWaitableTimer(NULL, true, NULL);
SetWaitableTimer(timer, &ft, 0, NULL, NULL, 0);
WaitForSingleObject(timer, INFINITE);
CloseHandle(timer);
@@ -324,7 +324,7 @@ LLTimer::LLTimer()
get_timer_info().update();
}
- mStarted = TRUE;
+ mStarted = true;
reset();
}
@@ -441,31 +441,31 @@ F32SecondsImplicit LLTimer::getRemainingTimeF32() const
}
-BOOL LLTimer::checkExpirationAndReset(F32 expiration)
+bool LLTimer::checkExpirationAndReset(F32 expiration)
{
U64 cur_ticks = get_clock_count();
if (cur_ticks < mExpirationTicks)
{
- return FALSE;
+ return false;
}
mExpirationTicks = cur_ticks
+ (U64)((F32)(expiration * get_timer_info().mClockFrequency));
- return TRUE;
+ return true;
}
-BOOL LLTimer::hasExpired() const
+bool LLTimer::hasExpired() const
{
return (get_clock_count() >= mExpirationTicks)
- ? TRUE : FALSE;
+ ? true : false;
}
///////////////////////////////////////////////////////////////////////////////
-BOOL LLTimer::knownBadTimer()
+bool LLTimer::knownBadTimer()
{
- BOOL failed = FALSE;
+ bool failed = false;
#if LL_WINDOWS
WCHAR bad_pci_list[][10] = {L"1039:0530",
@@ -507,7 +507,7 @@ BOOL LLTimer::knownBadTimer()
if (!wcscmp(pci_id, bad_pci_list[check]))
{
// LL_WARNS() << "unreliable PCI chipset found!! " << pci_id << endl;
- failed = TRUE;
+ failed = true;
break;
}
}
@@ -533,7 +533,7 @@ time_t time_corrected()
// Is the current computer (in its current time zone)
// observing daylight savings time?
-BOOL is_daylight_savings()
+bool is_daylight_savings()
{
time_t now = time(NULL);
@@ -547,7 +547,7 @@ BOOL is_daylight_savings()
}
-struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time)
+struct tm* utc_to_pacific_time(time_t utc_time, bool pacific_daylight_time)
{
S32Hours pacific_offset_hours;
if (pacific_daylight_time)