parent
35761edaec
commit
16409d449b
@ -27,7 +27,7 @@ namespace Aurora::IO::Loop
|
||||
LSTimerIP(AuUInt32 reschedStepMsOrZero, AuUInt32 maxIterationsOrZero, bool bSingleshot);
|
||||
~LSTimerIP();
|
||||
|
||||
PROXY_LOOP_LOOPSOURCE_EXT_WAIT_APIS_;
|
||||
PROXY_LOCAL_LOOPSOURCE_EXT_APIS_;
|
||||
|
||||
virtual void UpdateTimeWall(AuUInt64 absTimeMs) override;
|
||||
virtual void UpdateTimeWallNs(AuUInt64 absTimeNs) override;
|
||||
|
@ -21,6 +21,11 @@ namespace Aurora::IO::Loop
|
||||
pPeekMessageW(&askers, 0, 0, 0, PM_NOREMOVE);
|
||||
}
|
||||
|
||||
bool Win32Dummy::IsSignaledExt(AuUInt8 uFlags)
|
||||
{
|
||||
return this->IsSignaled();
|
||||
}
|
||||
|
||||
bool Win32Dummy::WaitOn(AuUInt32 timeout)
|
||||
{
|
||||
// TODO: Close
|
||||
@ -42,6 +47,41 @@ namespace Aurora::IO::Loop
|
||||
return ELoopSource::eSourceWin32;
|
||||
}
|
||||
|
||||
bool Win32Dummy::WaitOnExt(AuUInt8 uFlags, AuUInt32 uTimeoutRelMS)
|
||||
{
|
||||
return this->WaitOn(uTimeoutRelMS);
|
||||
}
|
||||
|
||||
bool Win32Dummy::WaitOnAbs(AuUInt64 uTimeoutAbs)
|
||||
{
|
||||
if (uTimeoutAbs)
|
||||
{
|
||||
auto uNow = AuTime::SteadyClockNS();
|
||||
if (uNow >= uTimeoutAbs)
|
||||
{
|
||||
return this->IsSignaled();
|
||||
}
|
||||
|
||||
auto uDiff = AuNSToMS<AuUInt64>(uTimeoutAbs - uNow);
|
||||
|
||||
if (!uDiff)
|
||||
{
|
||||
return this->IsSignaled();
|
||||
}
|
||||
|
||||
return this->WaitOn(uDiff);
|
||||
}
|
||||
else
|
||||
{
|
||||
return this->WaitOn(0);
|
||||
}
|
||||
}
|
||||
|
||||
bool Win32Dummy::WaitOnAbsExt(AuUInt8 uFlags, AuUInt64 uTimeoutAbs)
|
||||
{
|
||||
return this->WaitOnAbs(uTimeoutAbs);
|
||||
}
|
||||
|
||||
AUKN_SYM AuSPtr<ILoopSource> NewLSWin32Source(bool pumping)
|
||||
{
|
||||
AuSPtr<ILoopSource> ret;
|
||||
|
@ -17,7 +17,11 @@ namespace Aurora::IO::Loop
|
||||
const bool bIsPumping_;
|
||||
|
||||
bool IsSignaled() override;
|
||||
bool IsSignaledExt(AuUInt8 uFlags) override;
|
||||
bool WaitOn(AuUInt32 timeout) override;
|
||||
ELoopSource GetType() override;
|
||||
bool WaitOnExt(AuUInt8 uFlags, AuUInt32 uTimeoutRelMS) override;
|
||||
bool WaitOnAbs(AuUInt64 uTimeoutAbs) override;
|
||||
bool WaitOnAbsExt(AuUInt8 uFlags, AuUInt64 uTimeoutAbs) override;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user