4#include "Stroika/Foundation/StroikaPreComp.h"
6#if qStroika_Foundation_Common_Platform_Windows
9#error "WINDOWS REQUIRED FOR THIS MODULE"
12#include "Stroika/Foundation/Common/Common.h"
13#include "Stroika/Foundation/Containers/Common.h"
19#include "WaitSupport.h"
23using namespace Stroika::Foundation::Execution::Platform;
45 for (
Time::DurationSeconds timeLeft = endAt - Time::GetTickCount (); timeLeft > 0s; timeLeft = endAt - Time::GetTickCount ()) {
47 DWORD waitResult = ::MsgWaitForMultipleObjectsEx (
static_cast<DWORD
> (waitOn.size ()),
Containers::Start (waitOn),
48 Platform::Windows::Duration2Milliseconds (timeLeft), QS_ALLEVENTS, MWMO_INPUTAVAILABLE);
49 if (WAIT_OBJECT_0 <= waitResult and waitResult < WAIT_OBJECT_0 + waitOn.size ()) {
53 while (::PeekMessage (&msg,
nullptr, 0, 0, PM_REMOVE)) {
55 if (dialog ==
nullptr or not::IsDialogMessage (dialog, &msg)) {
56 ::TranslateMessage (&msg);
57 ::DispatchMessage (&msg);
62 timeLeft = endAt - Time::GetTickCount ();
80 while (::PeekMessage (&msg,
nullptr, 0, 0, PM_REMOVE)) {
82 if (dialog ==
nullptr or not::IsDialogMessage (dialog, &msg)) {
83 ::TranslateMessage (&msg);
84 ::DispatchMessage (&msg);
89 if (endAt < Time::GetTickCount ()) {
time_point< RealtimeClock, DurationSeconds > TimePointSeconds
TimePointSeconds is a simpler approach to chrono::time_point, which doesn't require using templates e...
chrono::duration< double > DurationSeconds
chrono::duration<double> - a time span (length of time) measured in seconds, but high precision.
CONTAINER::value_type * Start(CONTAINER &c)
For a contiguous container (such as a vector or basic_string) - find the pointer to the start of the ...
void CheckForInterruption()