tnx to m1geo
This commit is contained in:
Kim Huebel 2018-04-04 19:06:19 +00:00
parent 9cb475cadd
commit 177d66f811
2 changed files with 22 additions and 20 deletions

View file

@ -89,37 +89,39 @@ function checkSetup() {
}
function startStopwatch() {
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$_SESSION['starttime'] = $time;
return $time;
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$_SESSION['starttime'] = $time;
return $time;
}
function getLapTime() {
$start = $_SESSION['starttime'];
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$lap_time = round(($finish - $start), 4);
return $lap_time;
$start = $_SESSION['starttime'];
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$lap_time = round(($finish - $start), 4);
return $lap_time;
}
function showLapTime($func) {
if( defined("DEBUG") ) {
?><script>console.log('<?php echo $func . ": ". getLapTime(); ?> sec.');</script><?php
}
if( defined("DEBUG") ) {
?><script>console.log('<?php echo $func . ": ". getLapTime(); ?> sec.');</script><?php
}
}
function convertTimezone($timestamp) {
$date = new DateTime($timestamp);
$date->setTimezone(new DateTimeZone(TIMEZONE));
return $date->format('Y-m-d H:i:s');
try {
$date = new DateTime($timestamp);
$date->setTimezone(new DateTimeZone(TIMEZONE));
return $date->format('Y-m-d H:i:s');
} catch (Exception $err) {}
}
function encode($hex) {
$validchars = " abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789";
$validchars = " abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789";
$str = '';
$chrval = hexdec($hex);
$str = chr($chrval);

View file

@ -1,3 +1,3 @@
<?php
define("VERSION", "20180404-1 (".getGitVersion().")");
define("VERSION", "20180404-2 (".getGitVersion().")");
?>