code: function( times ) {
  
  		function compareTime( i, j ) {
  
  			return times[ i ] - times[ j ];
  
  		}
  
  		var n = times.length;
  		var result = new Array( n );
  		for ( var i = 0; i !== n; ++ i ) result[ i ] = i;
  
  		result.sort( compareTime );
  
  		return result;
  
  	}
docs: returns an array by which times and values can be sorted