Ctrl+C handling is done in ctrlc.c, and a break condition now persists until the interactive reader begins to process the next command. The condition is cleared by calling ctrlc_clear().
Use nanosleep() on Unix-like systems, and Sleep() on Windows.