Is it possible to set a hardware timer peripheral up on the Raspberry Pi and get an interrupt at a certain time (while running under Linux)? Is there a library/example?
I know you can get an irq when a pin changes via wiringPi (when running with admin privileges), so if there's a free timer peripheral it seems possible.
this post on the Pi forums implies that there is a free STC register, and this one gives some info but is tagged 'BareMetal', which I assume means Linux isn't involved?
Background: I know this is not what Linux is good at at all, however I'm interested in adding a hardware timer capability to the Espruino JS interpreter. It's originally meant for microcontrollers and contains some code that expects to be run via a timer IRQ (eg. for software PWM, timed pulses, and other bits and bobs) - that part of it would be effectively useless if running in a thread.