first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,40 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __NTASKLOOP__
#define __NTASKLOOP__
//------------------------------------------------------------------------------
#define StartTaskLoop(_CONDITION, _TIMEOUT)\
{\
using namespace GS;\
\
int ref_clock = Platform::Get().GetClock();\
bool timeout = false;\
\
while (_CONDITION)\
{\
if ((Platform::Get().GetClock() - ref_clock) >= _TIMEOUT)\
{\
timeout = true;\
break;\
}
#define EndTaskLoop } }
#define EndTaskLoopOnTimeout(_ON_TIMEOUT)\
}\
\
if (timeout)\
{\
_ON_TIMEOUT\
}\
}
//------------------------------------------------------------------------------
#endif // __NTASKLOOP__