Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / examples / deprecated / java / process / kill / Victim.java
1 /* Copyright (c) 2006-2022. 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 process.kill;
8 import org.simgrid.msg.Msg;
9 import org.simgrid.msg.Task;
10 import org.simgrid.msg.Process;
11 import org.simgrid.msg.MsgException;
12 import org.simgrid.msg.HostNotFoundException;
13
14 public class Victim extends Process {
15   public Victim(String hostname, String name) throws HostNotFoundException {
16     super(hostname, name);
17   }
18   public void main(String[] args) throws MsgException{
19     Msg.info("Hello!");
20     Msg.info("Suspending myself");
21     suspend();
22     Msg.info("OK, OK. Let's work");
23     Task task = new Task("work", 1e9, 0);
24     task.execute();
25     Msg.info("Bye");
26   }
27 }