+ // Calculate sums
+ $sumNonce = calculateSumFromHash($nonceHash);
+
+ // Time spend in loop
+ $testTime = abs(microtime(TRUE) - $timeDisplay);
+
+ // Calculate hashrate/sec
+ $hashrate = 1 / $testTime * $iterSecond * 2;
+
+ // Only every second
+ if ($testTime >= 1) {
+ // Display hash rate
+ print ('hashrate=' . $hashrate . ' hashes/sec,iterSecond=' . $iterSecond . ' iterations/sec' . PHP_EOL);
+
+ // Reset timer
+ $timeDisplay = microtime(TRUE);
+ $iterSecond = 0;
+ } // END - if
+