A little timer wrote in Java