Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void someMethod() {
- final long lifeTime = 99999; // время работы метода
- long startTime = System.nanoTime();
- do {
- // логика вашего метода
- } while(System.nanoTime() - startTime < lifeTime)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement