title: Estimating latency of Windows events programmed in C# with .NET
body: <p>I have a working C# application using the .NET framework and I am tasked with estimating data latency from program input (USB serial port) to program output (UDP socket).  My program makes use of Windows <em>event handlers</em> for receiving input and thread coordination within the application.  I am wondering if anyone can recommend how to estimate the time until the <em>event handler</em> is raised/executed.  I just need an estimation method or reference, not an exact number.  I am aware that Windows is not a real-time OS so it will have a variance, perhaps very dependent upon the current load.</p>
  
  <p>Thanks
  Michael</p>