tnx to m1geo
This commit is contained in:
parent
9cb475cadd
commit
177d66f811
2 changed files with 22 additions and 20 deletions
|
@ -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);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
define("VERSION", "20180404-1 (".getGitVersion().")");
|
||||
define("VERSION", "20180404-2 (".getGitVersion().")");
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue