diff src/solver.tp @ 48:855c05c9cae1

Updated myproblems.json. Some solver fixes
author Mike Pavone <pavone@retrodev.com>
date Sun, 11 Aug 2013 04:03:51 -0700
parents e795f7179456
children 8409af16d6e5
line wrap: on
line diff
--- a/src/solver.tp	Sun Aug 11 02:35:40 2013 -0700
+++ b/src/solver.tp	Sun Aug 11 04:03:51 2013 -0700
@@ -141,8 +141,11 @@
 			start <- os time
 			resp <- (requests evalId: progId (info allInputs)) sendWithKey: authKey
 			end <- os time
+			if: (end - start) < 4 {
+				os sleep: (4 - (end - start))
+			}
 			if: (resp status) = "ok" {
-				print: "Start: " . (string: start) . ", End: " . (string: start) . "Duration: " . (string: end - start)
+				print: "Start: " . (string: start) . ", End: " . (string: start) . "Duration: " . (string: end - start) . "\n"
 				matches <- info findMatches: (resp outputs) at: 0
 				noSuccess <- true
 				cur <- 0
@@ -155,7 +158,10 @@
 					gstart <- os time
 					gresp <- (requests guess: progId (string: prog)) sendWithKey: authKey
 					gend <- os time
-					print: "Start: " . (string: gstart) . ", End: " . (string: gend) . "Duration: " . (string: gend - gstart)
+					print: "Start: " . (string: gstart) . ", End: " . (string: gend) . "Duration: " . (string: gend - gstart) . "\n"
+					if: (gend - gstart) < 4 {
+						os sleep: (4 - (gend - gstart))
+					}
 					if: (gresp status) = "win" {
 						noSuccess <- false
 					} else: {