38,42c38,40
< Intel8254Timer::Intel8254Timer(EventManager *em, const string &name)
< : EventManager(em), _name(name),
< counter0(this, name + ".counter0"),
< counter1(this, name + ".counter1"),
< counter2(this, name + ".counter2")
---
> Intel8254Timer::Intel8254Timer(EventManager *em, const string &name,
> Counter *counter0, Counter *counter1, Counter *counter2) :
> EventManager(em), _name(name)
44,46c42,44
< counter[0] = &counter0;
< counter[1] = &counter0;
< counter[2] = &counter0;
---
> counter[0] = counter0;
> counter[1] = counter1;
> counter[2] = counter2;
48a47,54
> Intel8254Timer::Intel8254Timer(EventManager *em, const string &name) :
> EventManager(em), _name(name)
> {
> counter[0] = new Counter(this, name + ".counter0");
> counter[1] = new Counter(this, name + ".counter1");
> counter[2] = new Counter(this, name + ".counter2");
> }
>
70,72c76,78
< counter0.serialize(base + ".counter0", os);
< counter1.serialize(base + ".counter1", os);
< counter2.serialize(base + ".counter2", os);
---
> counter[0]->serialize(base + ".counter0", os);
> counter[1]->serialize(base + ".counter1", os);
> counter[2]->serialize(base + ".counter2", os);
80,82c86,88
< counter0.unserialize(base + ".counter0", cp, section);
< counter1.unserialize(base + ".counter1", cp, section);
< counter2.unserialize(base + ".counter2", cp, section);
---
> counter[0]->unserialize(base + ".counter0", cp, section);
> counter[1]->unserialize(base + ".counter1", cp, section);
> counter[2]->unserialize(base + ".counter2", cp, section);