Update the profiling code to use a high resolution timer

Signed-off-by: Nick Lambourne <nick.lambourne@gmail.com>