Megatest

Diff
Login

Differences From Artifact [26ed88882a]:

To Artifact [8c6e608c5e]:


380
381
382
383
384
385
386
387


388
389
390
391
392
393
394
380
381
382
383
384
385
386

387
388
389
390
391
392
393
394
395







-
+
+







;; meta get and set vars
;;======================================================================

;; returns number if string->number is successful, string otherwise
;; also updates *global-delta*
(define (db:get-var db var)
  (let* ((start-ms (current-milliseconds))
         (throttle (string->number (config-lookup *configdat* "setup" "throttle")))
         (throttle (let ((t  (config-lookup *configdat* "setup" "throttle")))
		     (if t (string->number t) t)))
	 (res      #f))
    (sqlite3:for-each-row
     (lambda (val)
       (set! res val))
     db "SELECT val FROM metadat WHERE var=?;" var)
    ;; convert to number if can
    (if (string? res)