Added some code to check how long time it takes to execute code loaded from a dynamic library