Calculating Power Consumption Of A Device