Revision cbd2c699

View differences:

include/cmessage.h
164 164
    //
165 165
    // Horizon
166 166
    //
167
    simtime_t duration;                 // (minimum) duration of the asynchronous event
167
    simtime_t eventDuration;            // (minimum) eventDuration of the asynchronous event
168 168
    int taskindex;                      // used by cTaskHeap (-1 if not on heap)
169 169
    unsigned long taskinsertordr;       // used by cTaskHeap
170 170

  
......
210 210
    //@{
211 211

  
212 212
    /**
213
     * Returns the duration of this event.
213
     * Returns the eventDuration of this event.
214 214
     */
215 215
    simtime_t getEventDuration();
216 216

  
217 217
    /**
218
     * Sets the duration of this event.
218
     * Sets the eventDuration of this event.
219 219
     */
220
    inline void setEventDuration(simtime_t t)  {duration = t;}
220
    inline void setEventDuration(simtime_t t)  {eventDuration = t;}
221 221

  
222 222
    /**
223
     * Returns the end of the duration interval.
223
     * Returns the end of the eventDuration interval.
224 224
     */
225
    inline simtime_t getTend() const  {return delivd + duration;}
225
    inline simtime_t getTend() const  {return delivd + eventDuration;}
226 226
    //@}
227 227

  
228 228
    /** @name Internal Horizon use only. */
src/sim/cmessage.cc
83 83
    heapindex = -1;
84 84
    prev_event_num = -1;
85 85

  
86
    duration = SimTime::simTimeUninitialized;
86
    eventDuration = SimTime::simTimeUninitialized;
87 87
    msgtreeid = msgid = AO_fetch_and_add1(&next_id);
88 88
    AO_fetch_and_add1(&total_msgs);
89 89
    AO_fetch_and_add1(&live_msgs);
......
372 372
}
373 373

  
374 374
simtime_t cMessage::getEventDuration() {
375
    if (duration == SimTime::simTimeUninitialized) {
375
    if (eventDuration == SimTime::simTimeUninitialized) {
376 376
        cSimpleModule* mod = (cSimpleModule*) simulation.getModule(getArrivalModuleId());
377 377
        if (mod) {
378 378
            // block if another thread is busy inside this module
......
382 382
            // (in the mean time there may have been other events, changing the outcome of getProcessingDelay)
383 383
            mod->waitIfBusy();
384 384
            mod->setBusy();
385
            duration = mod->getProcessingDelay(this);
385
            eventDuration = mod->getProcessingDelay(this);
386 386
        }
387 387
    }
388
    return duration;
388
    return eventDuration;
389 389
}
390 390

  
391 391
//----
......
401 401
{
402 402
    len = l;
403 403
    encapmsg = NULL;
404
    duration = 0;
404
    eventDuration = 0;
405 405
    sharecount = 0;
406 406
}
407 407

  

Also available in: Unified diff