speed of calculation in microseconds question

closed account (zwA4jE8b)
Hi guys, I was reading another post and someone wrote about how many microseconds two different functions took to calculate the same results... (i didn't want to hijack the other thread)

How does one get the time in microseconds?

I currently have a program that uses...


time_t start, end;
time (&start);

//code here//

time (&end);
timediff = difftime(end, start);

to get the time taken to run the code. but this only gets results in increments of 1 second so if it takes less than one second my code displays 0.00 seconds.

Thank you,
-Mike-
Last edited on
closed account (zwA4jE8b)
I read up on the clock() function and it answered my ?
Were you talking about my post, by chance?
closed account (zwA4jE8b)
yes i was ultifinitus :)
closed account (zwA4jE8b)
cool program Duoas
closed account (zwA4jE8b)
what is this epoch time?
closed account (zwA4jE8b)
also, I tried using the macro _M_AMD64 because I have an x64 cpu but it did not work. Is there another macro that works with this, i also tried _WIN64, but no.
The "epoch time" is a system-specific timestamp.
Topic archived. No new replies allowed.