Keeping track of time for a program

I need a script for a program that can constantly interact with the computer to get its time, similar to the automatic updates on windows where you can choose a time to update at.

For my program I need to have the computer keep checking the time until it hits a 30 minute gap (i.e. xx:00 or xx:30). Then it will need to check the time every 30 minutes after that, or every half hour.

The method I have to do this right now is very memory consuming for it's just a while loop. I heard something about using listeners, but couldn't find anything on it. Any ideas?

[583 byte] By [HiddenS3cretesa] at [2007-11-27 5:10:28]
# 1
Use java.util.Timer and TimerTask, or an open source library called Quarts.
hiwaa at 2007-7-12 10:30:34 > top of Java-index,Java Essentials,Java Programming...