Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
public class Monitor extends Thread
private int maxOccurance;
private int totalOccurance;
private int timePeriod;
private double average;
private final int HISTORY_LENGTH = 10;
private int history = new int[HISTORY_LENGTH];
private int historyPtr;
public Monitor(int time, int frequency)
maxOccurance = frequency;
timePeriod = time * 1000;