Commit db257735 authored by Markus Seidl's avatar Markus Seidl

More logging because Go is not working as expected...

parent 6ce54a53
......@@ -32,7 +32,7 @@ func DisplayLoop(db *simpledb.Database) {
execute(curvid)
}
curvid = db.Rnd() //db.Next(curvid)
curvid = db.Next(curvid)
}
}()
......
......@@ -4,6 +4,7 @@ import (
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
"os"
"path/filepath"
......@@ -102,14 +103,18 @@ func (d *Database) Next(baseFile string) string {
// flaky, this might not find the real next every time
log.Println(">>>>>")
for _, e := range files {
_, filename := filepath.Split(e)
unixtime, _ := strconv.Atoi(filename)
log.Println(filename, unixtime)
if unixtime > baseInt {
return e
}
}
log.Println("<<<<<<")
if len(files) > 0 {
return files[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment