Arduino enthusiast and author Simon Monk has created his own version of the Arduino timer library in order to overcome some shortcomings of using the delay() function – as it holds up everything. With his library you can create multiple events that can be activated within a sketch and operate on their own timings. It’s a clever library and worth investigating further.
To do so, visit Simon’s blog for more examples and to download the library. And we’re on twitter and Google+, so follow us for news and product updates as well.
For longer timing events that require working with real time and date – consider using our super-accurate real-time clock module. Based on the DS3232, it has a temperature-controlled crystal oscillator for accurate time keeping, battery backup and 236 bytes of non-volatile memory for user data. For more information, see our modules page.