package org.kne.cloud.clock;

public class WatchDogTimer {
	private volatile long feedtime=System.nanoTime();
	private long timeout;
	public WatchDogTimer(long timeout) {
		super();
		this.timeout = timeout;
	}
	
	public void feed() {
		feedtime=System.nanoTime();
	}
	
	public boolean isBarking() {
		return(System.nanoTime()-feedtime)>timeout;
	}
	
}
