I think the clock() function is not working properly this is the stdout of my execution:
##### r = startTimer() - Return number of ticks: 0
##### d = stopTimer(r) - Return the difference in the execution time: 0
##### Calc= Calc/d; - Calc: ; -2147483648
Here my questions:
1.- Why are "r" und "d" 0?
2.- What does the method delay() does?
I mean I know that makes a delay of 1ms but I don't understand the code to produce this delay.
Could you explain better what your code should do?
Perhaps you could find this page useful: http://en.cppreference.com/w/cpp/chrono/c/clock
I’ve more or less copied the following code from an example I found there: