[*] bonk
This commit is contained in:
parent
5b9e780fa0
commit
1479bcaa22
@ -81,13 +81,19 @@ namespace Aurora::Threading::Primitives
|
|||||||
|
|
||||||
bool SemaphoreImpl::LockNS(AuUInt64 uTimeout)
|
bool SemaphoreImpl::LockNS(AuUInt64 uTimeout)
|
||||||
{
|
{
|
||||||
|
AuUInt64 uStart {};
|
||||||
|
AuUInt64 uEnd {};
|
||||||
|
|
||||||
if (this->TryLockNoSpin())
|
if (this->TryLockNoSpin())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
AuUInt64 uStart = AuTime::SteadyClockNS();
|
if (uTimeout)
|
||||||
AuUInt64 uEnd = uTimeout ? uStart + uTimeout : 0;
|
{
|
||||||
|
uStart = AuTime::SteadyClockNS();
|
||||||
|
uEnd = uStart + uTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
if (this->TryLockHeavy())
|
if (this->TryLockHeavy())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user