We developed an all-optical method to measure the temperature on gold (nanorods and nanostars) and magnetite nanoparticles under near-infrared and radiofrequency excitation by monitoring the excited state lifetime of Rhodamine B that lies within =/~20 nm from the nanoparticle surface. We reached high temperature sensitivity (0.029 ± 0.001 ns/°C) and low uncertainty (±0.3 °C). Gold nanostars are =/~3 and =/~100 times more efficient than gold nanorods and magnetite nanoparticles in inducing localized hyperthermia.