A timer directive for angularjs