Update power measurement code