]> ruin.nu Git - germs.git/blobdiff - src/threadgenesorter.h
Added progress information for the search
[germs.git] / src / threadgenesorter.h
index 57d10520611b4e702f53860ffff8364d74d0ff98..b002aa1b8dd68d117527dad0fb93529d762b7984 100644 (file)
@@ -81,6 +81,11 @@ class ThreadGeneSorter : public GeneSorter{
                 */
                void join();
 
+               /**
+                * Returns true while the sorter is running.
+                */
+               bool running();
+
                /**
                 * Tell the sorter to stop execution.
                 */
@@ -94,10 +99,11 @@ class ThreadGeneSorter : public GeneSorter{
                /**
                 * Waits for progress.
                 *
-                * \param time Max time to wait for.
+                * \param time Max time to wait for, in seconds.
                 * \param solutions The minimum number of solutions we'll wait for.
+                * \return The best score so far.
                 */
-               double progress(int time, int solutions = 1);
+               double wait(time_t time, size_t solutions = 1);
 
                /**
                 * Get the full list of solutions.