[RFC] Common: Add a buildin profiler

Would printing the thread name be useful? e.g. Is the time on the gpu thread, cpu thread or audio thread?