Revision cbd2c699 src/sim/cmessage.cc

View differences:

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