I think Ql_OS_GetTaskTickCount() is the number of ticks the task is running, so if the task is suspended it doen not increment, it is just for statics purposes only.
It is working perfectly. The only thing is that the second time I init the applicaiton from deep sleep, this counter has a value different from 0. So it seems to be somehow the value is stored, so I have to do this: