- #1
Victor Frankenstein
- 29
- 0
In this program I am using I first declare clock_t start, stop then later position start and stop in a loop. To count how long a switch is turned on. The smallest value I see outputed is no lower than 0.05 sec but I want to be able to count miliseconds.
printf("pulse length is %f seconds\n", (stop - start) / CLK_TCK);
What function or code should I use to be able to count lengths miliseconds and under ?
printf("pulse length is %f seconds\n", (stop - start) / CLK_TCK);
What function or code should I use to be able to count lengths miliseconds and under ?