Skip to content

Commit 9229e0c

Browse files
committed
method name refactoring
1 parent 527b47d commit 9229e0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/js/timer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ angular.module('timer', [])
2929
$scope.stop();
3030
});
3131

32-
function init() {
32+
function reset() {
3333
if ($scope.timeoutId) {
3434
$timeout.cancel($scope.timeoutId);
3535
}
3636
}
3737

3838
$scope.start = $element[0].start = function () {
3939
$scope.startTime = new Date();
40-
init();
40+
reset();
4141
tick();
4242
};
4343

4444
$scope.resume = $element[0].resume = function () {
45-
init();
45+
reset();
4646
$scope.startTime = new Date() - ($scope.stoppedTime - $scope.startTime);
4747
tick();
4848
};

0 commit comments

Comments
 (0)