I would expect the timer to have a 1 millisecond delay. instead I measure 2 milli when using std::chrono.
When I have configTICK_RATE_HZ ( 100 )
and rest the same, I would expect a 10 millisecond delay but instead I am measuring 11 milliseconds.
Additionally I note your code is calling printf() - you might get away
with that if it is only called from one thread, or very infrequently,
but as a general rule calling Windows system calls from kernel threads
can cause big issues as it can cause Windows to block the threads
whereas the FreeRTOS kernel assumes only it will block threads (it knows
nothing about the Windows scheduler). In the TCP code, which does a lot
of logging, we get around this by having a Windows thread that is not
under the control of the kernel do the printing - with the kernel’s
threads using a circular RAM buffer to send the strings they want to
print to that single thread.