round
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Rounds a float
round
(
int
|
float $num
,
int $precision
=
0
,
int $mode
=
PHP_ROUND_HALF_UP
):
float
public function
progress
()
{
return
$this
->
totalJobs
>
0
?
round
((
$this
->
processedJobs
() /
$this
->
totalJobs
) *
100
) :
0
;
}
src/Illuminate/Bus/Batch.php
$this
->
dispatcher
->
dispatch
(new
ScheduledTaskFinished
(
$event
,
round
(
microtime
(
true
) -
$start
,
2
)
));
$this
->
eventsRan
=
true
;
src/Illuminate/Console/Scheduling/ScheduleRunCommand.php
protected function
getElapsedTime
(
$start
)
{
return
round
((
microtime
(
true
) -
$start
) *
1000
,
2
);
}
src/Illuminate/Database/Connection.php
$result
=
$this
->
client
->{
$method
}(...
$parameters
);
$time
=
round
((
microtime
(
true
) -
$start
) *
1000
,
2
);
if (isset(
$this
->
events
)) {
$this
->
event
(new
CommandExecuted
(
$method
,
$parameters
,
$time
,
$this
));
src/Illuminate/Redis/Connections/Connection.php