A temperature sensor based on the intrapulse absorption spectroscopy technique has been developed to measure in situ temperature time-histories in a rapid compression machine (RCM). Two quantum-cascade lasers (QCLs) emitting near 4.55μm and 4.89μm were operated in pulsed mode, causing a frequency "down-chirp" across two ro-vibrational transitions of carbon monoxide. The down-chirp phenomenon resulted in large spectral tuning (δν ∼2.8cm-1) within a single pulse of each laser at a high pulse repetition frequency (100kHz). The wide tuning range allowed the application of the two-line thermometry technique, thus making the sensor quantitative and calibration-free. The sensor was first tested in non-reactive CO-N2 gas mixtures in the RCM and then applied to cases of n-pentane oxidation. Experiments were carried out for end of compression (EOC) pressures and temperatures ranging 9.21-15.32bar and 745-827K, respectively. Measured EOC temperatures agreed with isentropic calculations within 5%. Temperature rise measured during the first-stage ignition of n-pentane is over-predicted by zero-dimensional kinetic simulations. This work presents, for the first time, highly time-resolved temperature measurements in reactive and non-reactive rapid compression machine experiments. © 2016 Elsevier Ltd.