Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Dig through git history, and update copyright lines.
[simgrid.git] / examples / java / suspend / DreamMaster.java
1 /*
2  * Copyright (c) 2006-2013. The SimGrid Team.
3  * All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. 
7  */
8 package suspend;
9
10 import org.simgrid.msg.Host;
11 import org.simgrid.msg.Msg;
12 import org.simgrid.msg.Process;
13 import org.simgrid.msg.MsgException;
14 public class DreamMaster extends Process {
15         public DreamMaster(Host host, String name, String[]args) {
16                 super(host,name,args);
17         } 
18         public void main(String[] args) throws MsgException {
19                 Msg.info("Let's create a lazy guy.");
20                 Process lazyGuy = new LazyGuy(getHost(),"Lazy",null);
21                 lazyGuy.start();
22                 Msg.info("Let's wait a little bit...");
23                 waitFor(10);
24                 Msg.info("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
25                 lazyGuy.resume();
26                 Msg.info("OK, goodbye now.");
27         }
28 }