'Prints the timings'

def playbook_on_stats(self, stats):

    if (os.getenv('ANSIBLE_PROFILE_DISABLE') is not None):
        return
    if (self.current is not None):
        self.stats[self.current] = (time.time() - self.stats[self.current])
    results = sorted(self.stats.items(), key=(lambda value: value[1]), reverse=True)
    results = results[:10]
    for (name, elapsed) in results:
        print '{0:-<70}{1:->9}'.format('{0}    '.format(name), '    {0:.02f}s'.format(elapsed))
    total_seconds = sum([x[1] for x in self.stats.items()])
    print '\nPlaybook    finished:    {0},    {1}    total    tasks.        {2}    elapsed.    \n'.format(time.asctime(), len(self.stats.items()), datetime.timedelta(seconds=int(total_seconds)))
