The code shows the line:
Dim millisecs As Integer = runLength.Milliseconds
but that only provides the fraction of milliseconds left after seconds...so it only works for processes that take less than one second. The code should read
Dim millisecs As Integer = runLength.TotalMilliseconds
in order to provide total task time in Milliseconds. Another example here:
http://jetlounge.net/blogs/teched/archive/2008/01/02/sometimes-even-msdn-is-wrong.aspx