Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Incorporate simgrid-java in simgrid-java/.
[simgrid.git] / simgrid-java / examples / pingPong / PingPongTask.java
1 /*
2  * Copyright 2006-2012. The SimGrid Team. All rights reserved. 
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. 
6  */
7
8 package pingPong;
9 import org.simgrid.msg.NativeException;
10 import org.simgrid.msg.Task;
11
12 public class PingPongTask extends Task {
13    
14    private double timeVal;
15    
16    public PingPongTask() throws NativeException {
17       this.timeVal = 0;
18    }
19    
20    public PingPongTask(String name, double computeDuration, double messageSize) throws NativeException {      
21       super(name,computeDuration,messageSize);          
22    }
23    
24    public void setTime(double timeVal){
25       this.timeVal = timeVal;
26    }
27    
28    public double getTime() {
29       return this.timeVal;
30    }
31 }
32