Fix comment; these are the least signifincant bits (LSBs), not MSBs
[lhc/web/wiklou.git] / includes / utils / UIDGenerator.php
index 4881e68..9ac5009 100644 (file)
@@ -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 ) {