- public EnergyConsumer(Host host, String name, String[] args) {
- super(host,name,args);
- }
- @Override
- public void main(String[] args) throws MsgException {
- Msg.info("Currently consumed energy: "+getHost().getConsumedEnergy());
- this.waitFor(10);
- Msg.info("Currently consumed energy after sleeping 10 sec: "+getHost().getConsumedEnergy());
- new Task(null, 1E9, 0).execute();
- Msg.info("Currently consumed energy after executing 1E9 flops: "+getHost().getConsumedEnergy());
- }
+ public EnergyConsumer(Host host, String name, String[] args) {
+ super(host,name,args);
+ }
+
+ @Override
+ public void main(String[] args) throws MsgException {
+ Msg.info("Currently consumed energy: "+getHost().getConsumedEnergy());
+ this.waitFor(10);
+ Msg.info("Currently consumed energy after sleeping 10 sec: "+getHost().getConsumedEnergy());
+ new Task(null, 1E9, 0).execute();
+ Msg.info("Currently consumed energy after executing 1E9 flops: "+getHost().getConsumedEnergy());
+ }