[DGD] Heart beat and alternatives?

Troels Therkelsen troels at 2-10.org
Thu Oct 4 11:40:15 CEST 2001


Hi Dimitri,

A heart beat is a term coined by LPC drivers that also directly support
it (eg., MudOS) via driver functionality.  The way it works in those
drivers is that there is a heart beat interval, typically 2 seconds.
Objects that wish to 'have a heart beat' registers themselves with the
driver and then the function void heart_beat() will be called each heart
beat.  Historically, those drivers also had driver support for whether an
object was 'living' or not, so it made intuitive sense to call it heart
beats.

In a nutshell, a heart beat is just a call_out() which is automatically
repeated.

DGD does not support heart beats because it's trivial to simulate the
functionality with the call_out() kfun.

Very crudely (it should be done with a handler etc etc ;):

void create() {
  call_out("heart_beat", 2);
}

void heart_beat() {
  /* do stuff like regen hps etc */
  call_out("heart_beat", 2);
}

On Thu, 4 Oct 2001, Dimitri Skeber wrote:
> Is there anyone who can explain what is heart beat and is
> there alternatives to it?
>
> --
> Dimitri 'diskus' Skeber
>
>
> _________________________________________________________________
> List config page:  http://list.imaginary.com/mailman/listinfo/dgd
>

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list