Timer improvement to store the SuRoot shared_ptr if passed
Also add a test for the main function.
Cherry picked from commits :