Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 75dc519

Browse files
Gugimanmakasim
authored andcommitted
Do not cast microtime to integer
The benefit of precise scheduling using microtime is gone when casting microtime output to integer var_dump((int) microtime(true) * 10000); // int(15180039750000) var_dump(time()); // int(1518003975) var_dump(microtime(true) * 10000); // float(15180039759562)
1 parent 566f1d1 commit 75dc519

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/dbal/DbalProducer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function send(PsrDestination $destination, PsrMessage $message)
8383

8484
$dbalMessage = [
8585
'id' => $uuid,
86-
'published_at' => (int) microtime(true) * 10000,
86+
'published_at' => microtime(true) * 10000,
8787
'body' => $body,
8888
'headers' => JSON::encode($message->getHeaders()),
8989
'properties' => JSON::encode($message->getProperties()),

0 commit comments

Comments
 (0)