// TimerStop.java
// $Id: TimerStop.java,v 1 1997/08/13 09:40 osofia Exp $
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html

package w3c.rtsp.server;

import java.io.*;
import java.util.*;
import java.net.*;
import java.awt.*;
import w3c.rtsp.common.*;
import w3c.rtsp.client.Timer;

//timer who signal the end of a event.

public class TimerStop extends Timer{

  protected Process p=null;

  //HandleEvent is called at the end of the timeout.

  public void handleEvent(){
    System.out.println("\nHandle event");
    p.destroy();
    this.stop();
  }

  //Constructor.

  public TimerStop(long timeout,Process p){
    super(timeout*1000);
    this.p=p;
  }
}
