Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New platform files (just add AS tag)
[simgrid.git] / examples / java / ping_pong / PingPongTask.java
1 /*
2  * Copyright 2006,2007,2010. 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 import simgrid.msg.*;
9
10 public class PingPongTask extends Task {
11    
12    private double timeVal;
13    
14    public PingPongTask() throws NativeException {
15       this.timeVal = 0;
16    }
17    
18    public PingPongTask(String name, double computeDuration, double messageSize) throws NativeException {      
19       super(name,computeDuration,messageSize);          
20    }
21    
22    public void setTime(double timeVal){
23       this.timeVal = timeVal;
24    }
25    
26    public double getTime() {
27       return this.timeVal;
28    }
29 }
30