I see your point. This was a quick way to have a little bit of insight in where the time was spent. We should probably refactor the whole thing to have a more generic solution. Possibly use an existing library