Use current time when stopping a task so it can be better unit tested.
Added getTaskStats method which returns data on all runs of  a task.