-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Correct handling of --display-interval. #1591
Conversation
ethminer/main.cpp
Outdated
@@ -933,19 +932,29 @@ class MinerCLI | |||
PoolManager::p().start(); | |||
|
|||
unsigned interval = m_displayInterval; | |||
const unsigned sleep_interval = (m_displayInterval >= 2) ? 2 : 1; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just make the sleep interval 1? With 2 you can't do a display interval of 3 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you remember - you added the interval of 2 (c41982c ... faster shutdown commit)
I thought you had a specific reason sleeping minimum of 2 secs. (CPU load)
But I also think its not useful using display intervals < 2 so I joined the idea of sleeping 2 secs as minimum (if possible).
With 2 you can't do a display interval of 3 seconds.
I wait the missing 1 second (for 3 secs) in Line 951 ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, but still I screwed up by using an interval of 2. Wouldn't it be simpler to just use an interval of one, and not have to deal with the special case of an odd number of seconds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK - I'll adapt...
... but still I screwed up by using an interval of 2 ...
Was your idea - thought you don't wanted to stress the CPU with an interval of one sec...
ethminer/main.cpp
Outdated
continue; | ||
} | ||
if (interval) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jean-m-cyr : Here is the rest of the display time....
To use less cpu ethminer slept always for two seconds till display-interval was reached or exceeded. This commit corrects the handling of display interval.
f73508f
to
75f43e8
Compare
To use less cpu ethminer slept always for two seconds till
display-interval was reached or exceeded.
This commit corrects the handling of display interval.
Fixes also #1589