Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc' into mc++
[simgrid.git] / examples / java / suspend / LazyGuy.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 suspend;
8
9 import org.simgrid.msg.Host;
10 import org.simgrid.msg.Msg;
11 import org.simgrid.msg.Process;
12 import org.simgrid.msg.MsgException;
13 public class LazyGuy extends Process {
14         public LazyGuy(Host host, String name, String[]args) {
15                 super(host,name,args);
16         } 
17         public void main(String[] args) throws MsgException {
18                 Msg.info("Nobody's watching me ? Let's go to sleep.");
19                 suspend();
20                 Msg.info("Uuuh ? Did somebody call me ?");
21                 Msg.info("Mmmh, goodbye now.");
22         }
23 }