Skip to content

Commit

Permalink
tweak: make timestamp comparison less accurate to allow for time spen…
Browse files Browse the repository at this point in the history
…t generating ulid
  • Loading branch information
g105b committed Sep 13, 2023
1 parent c4e0e7f commit 71bf4c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/phpunit/UlidTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function testGetPrefix():void {
public function testGetTimestamp():void {
$sut = new Ulid();
$now = round(microtime(true) * 1000);
self::assertSame(round($now / 10), round($sut->getTimestamp() / 10));
self::assertSame(round($now / 1000), round($sut->getTimestamp() / 1000));
}

public function testGetTimestamp_setInConstructor():void {
Expand Down

0 comments on commit 71bf4c9

Please sign in to comment.