Suppose I want to measure the time that a certain piece of code takes. For that I would normally do something like this
clock_t startTime = clock(); //do stu
From the Linux terminal use 'time path_to_app'
This will return everything you want to know.