summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltimer.cpp
diff options
context:
space:
mode:
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)