MCPcopy Create free account
hub / github.com/cemu-project/Cemu / IOS_CreateTimer

Function IOS_CreateTimer

src/Cafe/IOSU/kernel/iosu_kernel.cpp:224–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222 }
223
224 IOS_ERROR IOS_CreateTimer(uint32 startMicroseconds, uint32 repeatMicroseconds, uint32 queueId, uint32 message)
225 {
226 std::unique_lock _l(sTimerMutex);
227 IOSTimer& timer = IOS_GetFreeTimer();
228 timer.queueId = queueId;
229 timer.message = message;
230 HRTick nextFire = HighResolutionTimer::now().getTick() + HighResolutionTimer::microsecondsToTicks(startMicroseconds);
231 timer.repeat = HighResolutionTimer::microsecondsToTicks(repeatMicroseconds);
232 IOS_TimerSetNextFireTime(timer, nextFire);
233 timer.isValid = true;
234 sTimerCV.notify_one();
235 return (IOS_ERROR)(&timer - sTimers.data());
236 }
237
238 IOS_ERROR IOS_StopTimer(IOSTimerId timerId)
239 {

Callers 1

SetTimerUpdateMethod · 0.85

Calls 3

IOS_TimerSetNextFireTimeFunction · 0.85
getTickMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected