Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
pingPong -> app/pingpong
[simgrid.git] / examples / java / app / pingpong / PingPongTask.java
1 /* Copyright (c) 2006-2014, 2016. 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 app.pingpong;
8 import org.simgrid.msg.Task;
9 import org.simgrid.msg.NativeException;
10
11 public class PingPongTask extends Task {
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 }