src/Generator/Binary/FloatingTimeGenerator.php 1 location
|
@@ 74-76 (lines=3) @@
|
| 71 |
|
throw new ZeroArgumentException(sprintf('Time offset should be grate then or equal to "0", got "%d" instead.', $time_offset)); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
if ($time_length > 64 - 1) { |
| 75 |
|
throw new ArgumentRangeException(sprintf('Length of time and prefix for UID should be less than or equal to "%d", got "%d" instead.', 64 - 1, $time_length)); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
$now = (int) floor(microtime(true) * 1000); |
| 79 |
|
|
src/Generator/Binary/TimeBinaryGenerator.php 1 location
|
@@ 99-101 (lines=3) @@
|
| 96 |
|
throw new ZeroArgumentException(sprintf('Time offset should be grate then or equal to "0", got "%d" instead.', $time_offset)); |
| 97 |
|
} |
| 98 |
|
|
| 99 |
|
if ($prefix_length + $time_length > 64 - 1) { |
| 100 |
|
throw new ArgumentRangeException(sprintf('Length of time and prefix for UID should be less than or equal to "%d", got "%d" instead.', 64 - 1, $prefix_length + $time_length)); |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
$now = (int) floor(microtime(true) * 1000); |
| 104 |
|
|