Install the Debounce rule template from the Marketplace and follow the instructions (more on rule templates here) to configure your Items and instantiate the rule. That will be the easiest approach.
If you want to code up the rule yourself, see [Deprecated] Design Pattern: Motion Sensor Timer. The overall approach is set a Timer on the first event for some short time (two seconds to meet your requirement). When the rule triggers again, if the Timer already exists reschedule it. Two seconds after the Item stops changing the Timer will go off and send your alert in the Timer’s body.