I'm porting some audio playback code from iOS to wp8 (don't ask why), and I'm encountering some troubles with timers on my wp8 device. After some cursory research, I decided to go with QueryPerformanceCounter as a good-enough parallel to the MachAbsoluteTime stuff on iOS. However, since my device (Nokia Lumia 920) is dual core, QPC encounters problems, and my deltas often end up negative or ridiculously high. I need my playback loop to run every 10ms, but these spurious timer results are throwing my code off.
I looked into somehow giving my loop processor affinity, but I can't find a way to do so, since I can either use tasks or the threadpool instead of explicit thread creation on wp8. Any suggestions? Is there another timer I can use, or is there a way to give tasks or threadpool workitems proc affinity?