简体   繁体   中英

What's the easiest way to implement a timer in Java?

I'm building a JSF application ( assignment for college ) where people log in the site, bid and when the time expires a pop up window or an output tag announces who is the winner.

So I want to know how can I make an output tag update his value every second ( to show the user how much time he has to bid ) and when it reaches 60 seconds it calls a method to show the pop up window ( or tag ) and announce the winner.

Thanks. Obs: ESL.

Maybe a TimerTask is what you want.

Richfaces has got a4j:poll , which fits for you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM