Many thanks for you comments. Don't take the word "clever" as granded I, was just looking for a solution.
My latest idea would be to work with two task, one is just reading out the time with pulsin in a register .The other task would process the value accordingly.
I just have to make sure that...