mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
Merge remote-tracking branch 'origin/main' into feature/llm
This commit is contained in:
commit
f84f6a58de
@ -172,17 +172,17 @@ TimerDuration Renderer::GetTimerInterval(TimerHandle handle) const
|
|||||||
return TimerDuration{ timer.interval };
|
return TimerDuration{ timer.interval };
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::StarTimer(TimerHandle handle, TimerDuration delay)
|
void Renderer::StartTimer(TimerHandle handle, TimerDuration delay)
|
||||||
{
|
{
|
||||||
_starTimer(handle, delay.count(), TimerReprMax);
|
_startTimer(handle, delay.count(), TimerReprMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::StartRepeatingTimer(TimerHandle handle, TimerDuration interval)
|
void Renderer::StartRepeatingTimer(TimerHandle handle, TimerDuration interval)
|
||||||
{
|
{
|
||||||
_starTimer(handle, interval.count(), interval.count());
|
_startTimer(handle, interval.count(), interval.count());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::_starTimer(TimerHandle handle, TimerRepr delay, TimerRepr interval)
|
void Renderer::_startTimer(TimerHandle handle, TimerRepr delay, TimerRepr interval)
|
||||||
{
|
{
|
||||||
// Nothing breaks if these assertions are violated, but you should still violate them.
|
// Nothing breaks if these assertions are violated, but you should still violate them.
|
||||||
// A timer with a 1-hour delay is weird and indicative of a bug. It should have been
|
// A timer with a 1-hour delay is weird and indicative of a bug. It should have been
|
||||||
|
|||||||
@ -27,7 +27,7 @@ namespace Microsoft::Console::Render
|
|||||||
TimerHandle RegisterTimer(const char* description, TimerCallback routine);
|
TimerHandle RegisterTimer(const char* description, TimerCallback routine);
|
||||||
bool IsTimerRunning(TimerHandle handle) const;
|
bool IsTimerRunning(TimerHandle handle) const;
|
||||||
TimerDuration GetTimerInterval(TimerHandle handle) const;
|
TimerDuration GetTimerInterval(TimerHandle handle) const;
|
||||||
void StarTimer(TimerHandle handle, TimerDuration delay);
|
void StartTimer(TimerHandle handle, TimerDuration delay);
|
||||||
void StartRepeatingTimer(TimerHandle handle, TimerDuration interval);
|
void StartRepeatingTimer(TimerHandle handle, TimerDuration interval);
|
||||||
void StopTimer(TimerHandle handle);
|
void StopTimer(TimerHandle handle);
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ namespace Microsoft::Console::Render
|
|||||||
void _waitUntilCanRender() noexcept;
|
void _waitUntilCanRender() noexcept;
|
||||||
|
|
||||||
// Timer handling
|
// Timer handling
|
||||||
void _starTimer(TimerHandle handle, TimerRepr delay, TimerRepr interval);
|
void _startTimer(TimerHandle handle, TimerRepr delay, TimerRepr interval);
|
||||||
DWORD _calculateTimerMaxWait() noexcept;
|
DWORD _calculateTimerMaxWait() noexcept;
|
||||||
void _waitUntilTimerOrRedraw() noexcept;
|
void _waitUntilTimerOrRedraw() noexcept;
|
||||||
void _tickTimers() noexcept;
|
void _tickTimers() noexcept;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user