Oolite
Loading...
Searching...
No Matches
OOJavaScriptEngine(WatchdogTimer) Category Reference

Instance Methods

(void) - watchdogTimerThread [implementation]

Detailed Description

Definition at line 175 of file OOJSEngineTimeManagement.m.

Method Documentation

◆ watchdogTimerThread

- (void) watchdogTimerThread
implementation

Extends class OOJavaScriptEngine.

Definition at line 177 of file OOJSEngineTimeManagement.m.

178{
179 for (;;) {
180#if OOLITE_WINDOWS
181 Sleep(OOJS_TIME_LIMIT * 1000);
182#else
183 usleep(OOJS_TIME_LIMIT * 1000000);
184#endif
185
187 continue; // Most of the time, a script isn't running.
188
189 // Note: if you add logging here, you need a manual autorelease pool.
190
194
195 if (EXPECT_NOT(elapsed > sLimiterTimeLimit)) {
196 sStop = YES;
197 JS_TriggerAllOperationCallbacks(_runtime);
198 }
199 }
200}
#define EXPECT_NOT(x)
#define EXPECT(x)
#define OOJS_TIME_LIMIT
static BOOL sStop
static double sLimiterTimeLimit
static int sLimiterPauseDepth
static unsigned sLimiterStartDepth
static OOHighResTimeValue sLimiterStart
OOTimeDelta OOHighResTimeDeltaInSeconds(OOHighResTimeValue startTime, OOHighResTimeValue endTime)
uint64_t OOHighResTimeValue
#define OOGetHighResTime
#define OODisposeHighResTime(time)
double OOTimeDelta
Definition OOTypes.h:193

References EXPECT, EXPECT_NOT, OODisposeHighResTime, OOGetHighResTime, OOHighResTimeDeltaInSeconds(), OOJS_TIME_LIMIT, sLimiterPauseDepth, sLimiterStart, sLimiterStartDepth, sLimiterTimeLimit, sStop, and watchdogTimerThread.

Referenced by watchdogTimerThread.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this category was generated from the following file: