summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/main.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/main.js b/js/main.js
index 04e9bc9..d4e1c80 100644
--- a/js/main.js
+++ b/js/main.js
@@ -52,7 +52,10 @@ app.controller('VisualisationController', function($scope, $http, $q, $interval)
var buildsPath = apiBase + '/builders/' + key +
'/builds/' + lastBuildID;
+ var currentTime = Math.round(new Date().getTime() / 1000);
+
$http.get(buildsPath).then(function(response) {
+ var previousTime = Math.round(response.data.times[0] - response.data.times[1])
var details = {
success: checkInArray(response.data.text, 'successful'),
failed: checkInArray(response.data.text, 'failed'),