xNextTaskUnblockTime isn’t the time mark for the next scheduler point needed, as the Round Robin Scheduling may need earlier scheduling. It works for Tickless idle, as, by definition, at that point only the Idle task is ready, so the unblock time would be the next time the scheduler is needed.
Making the round robin period configurable, and then adding a way for the kernel to inform the port what the next “tick” the scheduler would be needed could move towards that ability.
Note, many processors don’t have a portable way to get an interrupt at an arbitary and changeable point in the future (and it needs to be changable, as the current task might block for a period shorter than the current next unblock time, so the next needed interrupt needs to be made shorter. Yes, a lot of processors have a way to do this, but will require choosing a processor specific hardware timer for this action, and that choice might well need to be application specific as to which timer the application doesn’t need for other choices.
By still measuring things in “ticks”, it allows processors/applications that can’t or don’t want to supply such a time still use the existing method, with perhaps a small optimization of not calling the FreeRTOS tick handler every tick, but just increment the system time and return, allowing a somewhat higher tick rate, or for systems that can do what you want, to define the “tick” to be very short, and delays are all specified in much bigger numbers. (and the tick type likely needing to be possible expanded to 64 bits).
The first step to being able to do that is to remove the built in assumption that Round Robin is based on every tick, so the tick can be made shorter and not clog the system.
In my mind, ideally Round Robin allocation should be configurable per task, or at least per priority level. It would also be great if it was based on actual CPU time given and not just that it was running when the tick interrupt occured. If you are using the performance counters, then that could be used to determine how much time it ACTUALLY got, and take into account time lost due to higher priority tasks interrupting it.