Converting time so it can used in a Integer <p>I'm working on some code in VB that can get the average time from the speed of button press. I've got the maths done however I'm having a problem converting a TimeSpan declaration into a Integer where it can be divided and made into a average. Can you please help. Thanks!</p> <p>Maths for code:</p> <p><strong>2nd click</strong></p> <pre><code>click count = 2 average= current time / 1 so current = time \ click count - 1 </code></pre> <p><strong>3rd click</strong></p> <pre><code>adveragetime + Current Time \ clickcount - 1 </code></pre> <p><strong>4th click</strong></p> <pre><code>average time * (click count -2) + Current Time \ clickcount -1 </code></pre>