[erlang-questions] Best way to do wall time alarms?

jm jeffm@REDACTED
Wed Jan 24 09:48:12 CET 2007


Bengt Kleberg wrote:
> On 2007-01-24 07:30, jm wrote:
>> Haven't had a change to investigate this and thought someone may have a 
>> good idea as to the best approach. I'm after a way for a process to be 
>> notified on the hour and then every quarter hour there after, eg, 00:00, 
>> 00:15, 00:30, 00:45, etc. The use of a quarter hour is just an example 
>> and in the real application it will be configurable. The use of notify 
>> hints at the use of gen_event as the receive or as an intermediary. The 
>> question really then is what is the best way to generate these events? 
>> Is there a standard approach, etc?
> 
> perhaps the module
> timer
> and one of the functions:
> apply_interval
> or
> send_interval
> 
> could help you to do what you want?


Thanks. I'm busy attempting to get my head around mnesia at the moment, 
hence not having a chance to investigate this. This question was sitting 
in the back of my mind distracting me and I thought that there must be a 
standard implementation as it's a common and basic thing to do. So far 
I've found the man page (part of stdlib) for timer which I'll have to 
read later.

Jeff.



More information about the erlang-questions mailing list