

angular.module("myApp").factory('average', [ '$log', function($log){
  var distance = 226;
  var computeAverage = function (time){
    var hours = time.getHours() + time.getMinutes()/60 + time.getSeconds()/3600;
    $log.debug(hours);
    return distance / hours;
  };

  return computeAverage;
}]);
