Skip to content

Instantly share code, notes, and snippets.

@bbredewold
Last active August 2, 2022 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbredewold/234ea64c3a541d1b208cf0a1b8142fb4 to your computer and use it in GitHub Desktop.
Save bbredewold/234ea64c3a541d1b208cf0a1b8142fb4 to your computer and use it in GitHub Desktop.
<?php
$arr = [];
$loopTime = now();
$counter = 0;
foreach ($arr as $i) {
if ($counter % 10 === 0) {
Log::driver('service')->info('EMPL', [
'cnt' => $counter,
'p/m' => 60_000_000 / (now()->diffInMicroseconds($loopTime) / 10),
]);
$loopTime = now();
}
$counter++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment