You might like to use the Unix <code>time</code> command, or whatever your operating system uses instead of it. Then instead of looking at the real time figure, look at user time and system time. Real time can vary quite a lot for the reasons already pointed-out. But user time and system time should not.