From Jeremy Rand via the Kansasfest List:
Today, I received the new No Slot Clock from Ultimate Apple 2 as found here on their store:
This inspired me to do some coding to try to use my new toy. It turns out that cc65 will use a real time clock if one is present and supported by ProDOS. The No Slot Clock just needs a special .system program to launch first to enable support for the clock in ProDOS. Even better, Virtual ][ which is the emulator used by the build pipeline has support for the No Slot Clock built-in.
I have pushed a new version of the build pipeline which includes the ProDOS support for the No Slot Clock in the ProDOS disk template. This means, you can use the time.h APIs from cc65 and they should work as expected under Virtual ][. If you put your executables on a machine with a RTC which is supported by ProDOS (No Slot Clock is one such clock but there are others including the //gs’s built-in clock), those APIs should work. So, you can get the current time, measure elapsed times, etc in your own programs. Grab the updated Xcode project template from here:
With that support in place, I decided to use it in a2sudoku. If you have a RTC in your system which is supported by ProDOS, this latest version of a2sudoku will tell you how many minutes it took you to solve a puzzle. If you do not have a RTC, it just congratulates you for solving the puzzle. The latest version of a2sudoku is here:
Happy timestamping and elapsed time measuring!