Bring in auto-adjusting frame rate code (from maze3.c).