Added duration variable to notification template. Fixes travis-ci/travis-ci#1427

This is a fix for travis-ci/travis-ci#1427