Actually before updating the ElapsedTime with new value, you should check if CounterActive is true. Otherwise it will keep on counting even after the trigger.
PS: If the issue is solved, kindlymark mark it as ‘SOLVED’. (I think you should click the tick mark on the answer to do this). This will help other people with the same query.