4 * Copyright 2006,2007 Martin Quinson, Malek Cherier
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the license (GNU LGPL) which comes with this package.
13 public class Slave extends simgrid.msg.Process {
15 public void main(String[] args) throws JniException, NativeException {
17 Msg.info("Hello i'm a slave");
19 Channel channel = new Channel(0);
23 double time1 = Msg.getClock();
24 Task t = channel.get();
25 double time2 = Msg.getClock();
27 if (t instanceof FinalizeTask) {
28 Msg.info("Received Finalize " + getHost().getName());
31 CommTimeTask task = (CommTimeTask)t;
33 if(time1 < task.getTime())
34 time1 = task.getTime();
36 /* Msg.info("Processing \"" + task.getName() + "\" " + getHost().getName() +
37 " (Communication time : " + (time2 - time1) + ")");
44 Msg.info("I'm done. See you!" + getHost().getName());