Is there any inbuilt class in java se / java ee representig an arbitrary "Time Resolution"; e.g every hour, every second, all 10 minutes etc. ?
Look at java.util.concurrent.TimeUnit enum, you may use the units from here.
Don't reinvent the wheel.
For more complex time operation I would suggest Joda time library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With