Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

counting time execution duration in time laravel

# 1. get initial time
$start = now();

  // code here ...

# 2. get diff time from $start
$time = $start->diffInSeconds(now());

# 3. convert it in human readable
$_format = CarbonCarbonInterval::seconds($time)->cascade()->forHumans();
 
PREVIOUS NEXT
Tagged: #counting #time #execution #duration #time #laravel
ADD COMMENT
Topic
Name
5+2 =