I'm not sure if you're looking for clock or difftime, but one of these should be what you're looking for:
http://www.cplusplus.com/reference/clibrary/ctime/clock/
http://www.cplusplus.com/reference/clibrary/ctime/difftime/
You can use this before and after functions and compare the differences of runtimes to see the overall runtime of a function.