Why this huge difference in WPF System.Timers.Timer function in DEBUG mode and RELEASE mode ( using Timer(2) as example )

  Kiến thức lập trình

Timer(2) in RELEASE mode should execute 500 calls per second ( 1000/N ) but it only executes 65 calls per second, probably because the 15 ms system timer resolution. In DEBUG mode it executes these 500 calls per second which indicate a much more precise system timer. I can not find any explanation for that.

LEAVE A COMMENT