Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

jhPrimeminer primes/s with average

By: a guest on Jul 17th, 2013  |  syntax: C++  |  size: 0.51 KB  |  views: 96  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.         double primesPerSecondSum = 0.0;
  2.         double primesPerSecondCount = 0.0;
  3.         while( true )
  4.         {
  5.                 // query new work
  6.                 jhMiner_queryWork_primecoin();
  7.                 // calculate stats every second tick
  8.                 if( loopCounter&1 )
  9.                 {
  10.                         // ...
  11.                         if( workData.dataIsValid )
  12.                         {
  13.                                 primesPerSecondSum += primesPerSecond;
  14.                                 primesPerSecondCount += 1.0;
  15.                                 printf("primes/s: %d / %d, best difficulty: %f\n", (sint32)primesPerSecond, (sint32)(primesPerSecondSum / primesPerSecondCount),(float)primeDifficulty);
  16.                         }
  17.                 }
  18.                 // ...
  19.         }
clone this paste RAW Paste Data