Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WTF] Avoid MonotonicTime::now / WallTime::now calls if relative seco…
…nds are infinity https://bugs.webkit.org/show_bug.cgi?id=256143 rdar://108706987 Reviewed by Mark Lam. This is micro-optimization. If relative seconds from now is infinity, we should not call MonotonicTime::now() / WallTime::now() to compute the result. They involve system calls, and it is common that relative seconds are infinity (for example, just waiting Condition without timeout is infinity). * Source/WTF/wtf/ApproximateTime.cpp: (WTF::ApproximateTime::approximateWallTime const): (WTF::ApproximateTime::approximateMonotonicTime const): * Source/WTF/wtf/Condition.h: * Source/WTF/wtf/GenericTimeMixin.h: (WTF::GenericTimeMixin::timePointFromNow): * Source/WTF/wtf/MessageQueue.h: (WTF::MessageQueue<DataType>::waitForMessageFilteredWithTimeout): * Source/WTF/wtf/MonotonicTime.cpp: (WTF::MonotonicTime::approximateWallTime const): * Source/WTF/wtf/ParkingLot.cpp: (WTF::ParkingLot::parkConditionallyImpl): * Source/WTF/wtf/WTFSemaphore.h: * Source/WTF/wtf/WallTime.cpp: (WTF::WallTime::approximateMonotonicTime const): * Source/WTF/wtf/threads/BinarySemaphore.h: * Source/WTF/wtf/win/RunLoopWin.cpp: (WTF::RunLoop::TimerBase::timerFired): (WTF::RunLoop::TimerBase::start): Canonical link: https://commits.webkit.org/263538@main
- Loading branch information
1 parent
b6e0a72
commit ab0f8a1
Showing
15 changed files
with
42 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters