19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
(sec (random 60))
(count 0))
(if (> sec lastsec)
(exec (sql db "INSERT INTO alldat (event_time,var,val) VALUES (?,?,?)")
(+ thetime sec) ;; (* sec 60))
"stuff"
(if (even? thehour)
(random 100)
(random 6))))
(if (< count 20)
(loop (max sec lastsec)(random 60)(+ count 1))))))))
(close-database db)
|
|
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
(sec (random 60))
(count 0))
(if (> sec lastsec)
(exec (sql db "INSERT INTO alldat (event_time,var,val) VALUES (?,?,?)")
(+ thetime sec) ;; (* sec 60))
"stuff"
(if (even? thehour)
(random 1000)
(random 6))))
(if (< count 20)
(loop (max sec lastsec)(random 60)(+ count 1))))))))
(close-database db)
|