added testcase to waiting time algorithm
yet another fix to avoid busy-wait while zero-window