1
0
Fork 0
gaming.bathynomus.xyz/lib.php

28 lines
461 B
PHP
Raw Normal View History

2023-01-10 08:08:45 +00:00
<?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";
}
}
?>