Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clock_t now = clock();
- myStartTime = start;
- myTimeLimit = 5 // in seconds
- for (int depth = 2; ((double)(now - myStartTime)) / (double)CLOCKS_PER_SEC < myTimeLimit; depth += 2)
- {
- //
- }
- var now = DateTime.Now;
- myStartTime = start;
- myTimeLimit = 5;
- for (int depth = 2; (now - myStartTime).TotalSeconds < myTimeLimit; depth += 2)
- {
- }
Add Comment
Please, Sign In to add comment