You could use a java.util.Timer which did that once a second. But you called this a "constant"... If that's the case then why not just declare it as a constant? Then this strange requirement goes away.

I'm not sure how you could do it with just a primitive, but you could create a wrapper, and implement the observer pattern. Then, you don't have to check every second, but instead have it alert whatever needs to know when it changes.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors

But instead of "constantly checking" to see if the variable has changed, you might consider making the variable private, with the only way to change it through a setter method. Then whenever the variable is changed, that setter method could also send notifications.

(Paul: I think "constant" is used here to mean "continuously" checking the value.)

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummersscce.org

The proper way to do this is to let whatever function that changes the value of the variable, notify of the change in some way. If you need a separate thread just to check up on a single variable, you are not writing your code in a good way.