PDA

View Full Version : timer functions



10-24-2000, 03:51 AM
hi there!
for getting good 3d-graphic-results its important to time them accuratly.
now herre comes my problem:
the linker does not find the gettimeofday command.
i include sys/time.h & unistd.h
and of course i link libc.so.6 into the project as well

so cold it be that libc is interfeerng with some mesa libs or do i just do something wrong?

thnX for every help you can give me
yourZ FruchtSaft

witcomb
10-27-2000, 04:29 PM
Might I make a suggestion. The standard timing functions are not only extremely slow but very inaccurate. You can get an optimized timer from flipcode.com for linux. Basically it reads cpu cylces and knowing the processor speed the time can easily be calculated. The link to the page where you can get this code is http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-PerfTimer&forum=cotd&id=-1

Good Luck with, email me if you have questions. I did not write this timer, nor am I taking any credit for it. But I do understand it.

Neil Witcomb