- Print arrival time instead of priority for Schedulables

at this stage of development


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@432 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-02-24 09:53:23 +00:00
parent 1395347b1a
commit edd8cc3e95
1 changed files with 11 additions and 11 deletions

View File

@ -363,7 +363,7 @@ void
TextSimulation::update() TextSimulation::update()
{ {
History& h = History::get_instance(); History& h = History::get_instance();
int when, pri; int when, arr;
ustring temp; ustring temp;
when = h.get_current_time(); when = h.get_current_time();
@ -382,8 +382,8 @@ TextSimulation::update()
smart_ptr<SchedulableStatus> running = h.get_scheduled_at(when); smart_ptr<SchedulableStatus> running = h.get_scheduled_at(when);
if (running) if (running)
{ {
pri = running->get_schedulable()->get_priority(); arr = running->get_schedulable()->get_arrival_time();
int_to_string(pri, temp); int_to_string(arr, temp);
_devices[dev]->write_buffer(" " + running->get_schedulable()->get_name() + "_(" + temp + ")"); _devices[dev]->write_buffer(" " + running->get_schedulable()->get_name() + "_(" + temp + ")");
} }
@ -392,8 +392,8 @@ TextSimulation::update()
for (uint i = 0; i < ll->size(); i++) for (uint i = 0; i < ll->size(); i++)
if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_ready) if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_ready)
{ {
pri = ll->get_item_at(i)->get_schedulable()->get_priority(); arr = ll->get_item_at(i)->get_schedulable()->get_arrival_time();
int_to_string(pri, temp); int_to_string(arr, temp);
_devices[dev]->write_buffer(" " + ll->get_item_at(i)->get_schedulable()->get_name() + "_(" + temp + ")"); _devices[dev]->write_buffer(" " + ll->get_item_at(i)->get_schedulable()->get_name() + "_(" + temp + ")");
} }
@ -402,8 +402,8 @@ TextSimulation::update()
for (uint i = 0; i < ll->size(); i++) for (uint i = 0; i < ll->size(); i++)
if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_blocked) if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_blocked)
{ {
pri = ll->get_item_at(i)->get_schedulable()->get_priority(); arr = ll->get_item_at(i)->get_schedulable()->get_arrival_time();
int_to_string(pri, temp); int_to_string(arr, temp);
_devices[dev]->write_buffer(" " + ll->get_item_at(i)->get_schedulable()->get_name() + "_(" + temp + ")"); _devices[dev]->write_buffer(" " + ll->get_item_at(i)->get_schedulable()->get_name() + "_(" + temp + ")");
} }
@ -412,8 +412,8 @@ TextSimulation::update()
for (uint i = 0; i < ll->size(); i++) for (uint i = 0; i < ll->size(); i++)
if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_future) if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_future)
{ {
pri = ll->get_item_at(i)->get_schedulable()->get_priority(); arr = ll->get_item_at(i)->get_schedulable()->get_arrival_time();
int_to_string(pri, temp); int_to_string(arr, temp);
_devices[dev]->write_buffer(" " + ll->get_item_at(i)->get_schedulable()->get_name() + "_(" + temp + ")"); _devices[dev]->write_buffer(" " + ll->get_item_at(i)->get_schedulable()->get_name() + "_(" + temp + ")");
} }
@ -422,8 +422,8 @@ TextSimulation::update()
for (uint i = 0; i < ll->size(); i++) for (uint i = 0; i < ll->size(); i++)
if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_terminated) if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_terminated)
{ {
pri = ll->get_item_at(i)->get_schedulable()->get_priority(); arr = ll->get_item_at(i)->get_schedulable()->get_arrival_time();
int_to_string(pri, temp); int_to_string(arr, temp);
_devices[dev]->write_buffer(" " + ll->get_item_at(i)->get_schedulable()->get_name() + "_(" + temp + ")"); _devices[dev]->write_buffer(" " + ll->get_item_at(i)->get_schedulable()->get_name() + "_(" + temp + ")");
} }