[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] How to delay a period for simulaton in C?



Date: Sun, 18 Jun 2000 10:34:37 -0300 (EST)
From: Carlos Alberto Kamienski <[email protected]>
To: Anaking <[email protected]>
Cc: Tan Su Wei <[email protected]>, [email protected]
Subject: Re: [ns] How to delay a period for simulaton in C?

Hi

I don't think it's possible to stop a function and resume later in the
same point in simulation time.
The way the scheduler schedule events is by calling functions ("handle"
function), so that you'll probably have to change your implementation a
little bit to get the same effect.

Carlos

---------------------------------------------
Carlos Alberto Kamienski       [email protected]

Doutorando em Ciencia da Computacao
Ph.D. Student
Departamento de Informatica - UFPE
---------------------------------------------

On Sun, 18 Jun 2000, Anaking wrote:

> Hi,
> 
> I intend to just stop a period and resume at this point. But using timer will
> invoke expire and then timeout(), the process seems not to continue at this
> function. This is why i didn't use timer.
> 
> How to do what I want?
> 
> Thanks
> 
> On Thu, 15 Jun 2000, you wrote:
> > Hi,
> >     Try to use the timer in ns c++ code. [chapter 10 in ns-manual]
> > 
> >         -> derive your new timer class from TimerHandler and define your expire
> > function (a virtual function in TimerHandler) which will be called when your
> > timer expired.
> > 
> > regards
> > Tan Su Wei
> > Anaking wrote:
> > 
> > > Hi, all,
> > > I would like to stop a interval and continue in the function (not to invoke an
> > > expire function). Can sleep do it? But i think it should be scheuler time.
> > > How to do it?
> > >
> > > Thanks.
>