Created
May 17, 2019 06:03
-
-
Save bobbyjam99-zz/b680b325c0c87a5704bff6c6be41a7de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Long startTime = DateTime.now().getTime(); | |
Long finishTime = DateTime.now().getTime(); | |
while ((finishTime - startTime) < 9000) { | |
// sleep for 9s | |
finishTime = DateTime.now().getTime(); | |
} | |
System.assertEquals(Integer.valueOf((finishTime - startTime) / 1000), 9); | |
System.debug('>>> Done from ' + startTime + ' to ' + finishTime); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment