1
0
Fork 0
gaming.bathynomus.xyz/lib.php
2023-01-10 01:08:45 -07:00

28 lines
No EOL
461 B
PHP

<?php
function roundtime($sec) {
if($sec > 3600) {
$hours = floor($sec/3600);
if($hours == 1) {
return $hours . " hour";
}
else {
return $hours . " hours";
}
} else if($sec > 60) {
$mins = floor($sec/60);
if($mins == 1) {
return $mins . " minute";
}
else {
return $mins . " minutes";
}
} else if($sec == 1) {
return $sec . " second";
}
else {
return $sec . " seconds";
}
}
?>