A power tool (100), such as a chainsaw, comprising means (230) for driving said power tool (100) and a controller (210). The power tool comprises a movement sensor (220) and the controller (210) is configured to receive a signal from said movement sensor (220), determine if said signal is a signal indicating a movement, determine a time wherein no signal indicating a movement is received, determine if said time exceeds a time period, and if so, disable said driving means (230).