I need a “time” or compare the number of a crunchy application written in C / C ++. The problem is that the machine on which I run the program is usually full of people who do such things, so the processors are always at full load.
I was thinking about using functions from time.h liket "get time of day" (I don’t remember the exact syntax, sorry) and analogies, but I'm afraid that they will not be good for this case, I'm right
And the bash time program gave me some errors a long time ago.
Also the problem is that sometimes I need to get timings in the range of 0.5 seconds, etc.
Does anyone have a clue?
PS: the compiler is gcc, and in some cases nvcc (NVIDIA) PS2: in my tests, I just want to measure the runtime between the two parts of the main function
source
share