Created
May 14, 2015 08:08
-
-
Save xgeek-net/5db74af24c4ee31a3100 to your computer and use it in GitHub Desktop.
This file contains hidden or 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