| 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 | { |
no test coverage detected