X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Fthreadgenesorter.h;fp=src%2Fthreadgenesorter.h;h=b002aa1b8dd68d117527dad0fb93529d762b7984;hb=6ce65cd9df9c007b0c7ad0e37fb82ac04a802a90;hp=57d10520611b4e702f53860ffff8364d74d0ff98;hpb=6b0585c4c6aa12aad13965d5f17be9a4a51653b5;p=germs.git diff --git a/src/threadgenesorter.h b/src/threadgenesorter.h index 57d1052..b002aa1 100644 --- a/src/threadgenesorter.h +++ b/src/threadgenesorter.h @@ -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.