I have a requirement such that my program is suppose to run for a definite period of time.
How could i maintain a timer in java such that the program only runs say for only 30 mins from the program execution start time.
I have a requirement such that my program is suppose to run for a
Share
Try this (probably in the main method):