You have not shown nearly enough code for anyone to help you. Do you know if the while loop is even being executed?
This style of clock generation is very poor for performance. The clock signal is usually the most active signal in a simulation and you want the least amount of indirection. A much better suggestion is to put this looping task inside the interface and have the driver call the task.