function getKeyframeOrder( times ) {

	function compareTime( i, j ) {

		return times[ i ] - times[ j ];

	}

	const n = times.length;
	const result = new Array( n );
	for ( let i = 0; i !== n; ++ i ) result[ i ] = i;

	result.sort( compareTime );

	return result;

}
Returns an array by which times and values can be sorted.

@param {Array<number>} times - The keyframe time values.
@return {Array<number>} The array.