Skip to content

Commit

Permalink
More typehints! Stop complaining please, Psalm 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed May 13, 2019
1 parent 4bc40c2 commit 228a9fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -2776,11 +2776,14 @@ public static function runtime_speed_test($iterations, $maxTimeout)
$end = 0.0;
/** @var float $start */
$start = microtime(true);
/** @var ParagonIE_Sodium_Core32_Int64 $a */
$a = ParagonIE_Sodium_Core32_Int64::fromInt(random_int(3, 1 << 16));
for ($i = 0; $i < $iterations; ++$i) {
/** @var ParagonIE_Sodium_Core32_Int64 $b */
$b = ParagonIE_Sodium_Core32_Int64::fromInt(random_int(3, 1 << 16));
$a->mulInt64($b);
}
/** @var float $end */
$end = microtime(true);
/** @var int $diff */
$diff = (int) ceil(($end - $start) * 1000);
Expand Down

0 comments on commit 228a9fc

Please sign in to comment.