Skip to content

Commit

Permalink
faster
Browse files Browse the repository at this point in the history
Why waste milliseconds doing the math every time?
  • Loading branch information
bbannon authored Mar 10, 2024
1 parent 224a5ae commit cc9a5f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function add_duration ( $time, $duration ) {
$minutes =
intval ( $time / 10000 ) * 60 + ( ( $time / 100 ) % 100 ) + $duration;
// If we ran past 240000, then roll back over to 000000.
$minutes %= ( 24 * 60 );
$minutes %= 1440;

return sprintf ( "%d%02d00", $minutes / 60, $minutes % 60 );
}
Expand Down

0 comments on commit cc9a5f6

Please sign in to comment.