Hi @Saju_John_Sebastian1,
have a look at this example: Boundary timer for serial user task - #2 by Ingo_Richtsmeier
Hope this helps, Ingo