Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 391 Bytes

CORE-SIM-EXAMPLES.md

File metadata and controls

24 lines (19 loc) · 391 Bytes

Discrete-Event Simulation Examples

Hello Example

public class Hello extends Processable {

    public Hello() {
        super("Jack");
    }

    public void run() {
        yield(env().timeout(10));
        System.out.println("Hello " + getId());
    }
}

public static void main(String[] args) {
    Env env = new Env();
    env.process(new Hello());
    env.run();
}