I thought some microprocessors like that were meant to be very cheap,
designed to allow a realtime clock as well as the stuff for processing
timebased information. One of those might be ideal. Just tap the realtime
clock circuit for the reference.
Typically that's the intended purpose of the alternate oscillator. You
have to provide the external crystal and perhaps some additional
parts.
You don't necessarily have access to the internal nodes to make it do
what you want, it might take some external gates or it might not even
be possible to make it work well, depending on the particular
processor and peripheral implementation. For example, you might have
to live with jitter in the interrupt latency affecting the gate time
if the right hardware isn't in place internally.
Best regards,
Spehro Pefhany