Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
leak--
[simgrid.git] / examples / java / tracing / PingPongTask.java
1 /* Copyright (c) 2006-2014. The SimGrid Team.
2  * 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 package tracing;
8 import org.simgrid.msg.NativeException;
9 import org.simgrid.msg.Task;
10
11 public class PingPongTask extends Task {
12    
13    private double timeVal;
14    
15    public PingPongTask() throws NativeException {
16       this.timeVal = 0;
17    }
18    
19    public PingPongTask(String name, double computeDuration, double messageSize) throws NativeException {      
20       super(name,computeDuration,messageSize);          
21    }
22    
23    public void setTime(double timeVal){
24       this.timeVal = timeVal;
25    }
26    
27    public double getTime() {
28       return this.timeVal;
29    }
30 }
31