clock cycle counter?

This is a discussion on clock cycle counter? within the C Programming forums, part of the General Programming Boards category; Is there some function in c under linux that one can use to count clock cycles/nr of ticks? or similar? ...