From: Matthew Flaschen Date: Thu, 5 Nov 2015 16:13:17 +0000 (-0500) Subject: Fix comment; these are the least signifincant bits (LSBs), not MSBs X-Git-Tag: 1.31.0-rc.0~8254 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=aa920550a8437f171d07f135d7121fe9cec3bb1b;p=lhc%2Fweb%2Fwiklou.git Fix comment; these are the least signifincant bits (LSBs), not MSBs Change-Id: I0102e4969d95c6392a48d4a5b2f2bec096a828a5 --- diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index 4881e686a3..9ac500943d 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -135,7 +135,7 @@ class UIDGenerator { $time = $info[0]; $counter = $info[1]; } - // Take the 46 MSBs of "milliseconds since epoch" + // Take the 46 LSBs of "milliseconds since epoch" $id_bin = $this->millisecondsSinceEpochBinary( $time ); // Add a 10 bit counter resulting in 56 bits total $id_bin .= str_pad( decbin( $counter ), 10, '0', STR_PAD_LEFT ); @@ -191,7 +191,7 @@ class UIDGenerator { $counter = $info[1]; $clkSeq = $info[2]; } - // Take the 46 bits of "milliseconds since epoch" + // Take the 46 LSBs of "milliseconds since epoch" $id_bin = $this->millisecondsSinceEpochBinary( $time ); // Add a 20 bit counter resulting in 66 bits total $id_bin .= str_pad( decbin( $counter ), 20, '0', STR_PAD_LEFT ); @@ -526,7 +526,7 @@ class UIDGenerator { /** * @param array $time Result of UIDGenerator::millitime() - * @return string 46 MSBs of "milliseconds since epoch" in binary (rolls over in 4201) + * @return string 46 LSBs of "milliseconds since epoch" in binary (rolls over in 4201) * @throws RuntimeException */ protected function millisecondsSinceEpochBinary( array $time ) {