Is there a tool which I can use to measure how much the execution of a task lasts?
If yes, how many milliseconds is enough to consider a task being heavy task?
Saying "heavy task" meaning that I am contemplating whether to send this task to background thread or not. Sending it would mean a couple of days of extra work to adopt the structure to it. And I would not like to send it to background thread if I don't have to.