Advertisement
Guest User

jhPrimeminer primes/s with average

a guest
Jul 17th, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  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.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement