Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 3616b9b

Browse files
袴田 俊輔pkozlowski-opensource
袴田 俊輔
authored andcommitted
refactor(ngScenario): use Date.now() for get current Time
Closes #10579
1 parent d224fe8 commit 3616b9b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ngScenario/ObjectModel.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ angular.scenario.ObjectModel = function(runner) {
114114
});
115115

116116
function complete(item) {
117-
item.endTime = new Date().getTime();
117+
item.endTime = Date.now();
118118
item.duration = item.endTime - item.startTime;
119119
item.status = item.status || 'success';
120120
}
@@ -188,7 +188,7 @@ angular.scenario.ObjectModel.prototype.getSpec = function(id) {
188188
angular.scenario.ObjectModel.Spec = function(id, name, definitionNames) {
189189
this.id = id;
190190
this.name = name;
191-
this.startTime = new Date().getTime();
191+
this.startTime = Date.now();
192192
this.steps = [];
193193
this.fullDefinitionName = (definitionNames || []).join(' ');
194194
};
@@ -234,7 +234,7 @@ angular.scenario.ObjectModel.Spec.prototype.setStatusFromStep = function(step) {
234234
*/
235235
angular.scenario.ObjectModel.Step = function(name) {
236236
this.name = name;
237-
this.startTime = new Date().getTime();
237+
this.startTime = Date.now();
238238
};
239239

240240
/**

0 commit comments

Comments
 (0)