Fix helpers checking for wtime existance

This commit is contained in:
Deon George 2023-11-18 16:57:30 +11:00
parent a74c5d5f5c
commit 116f726885

View File

@ -11,11 +11,13 @@ if (! function_exists('crc16')) {
function crc16($data): int
{
$crc = 0x0000;
for ($i = 0; $i < strlen($data); $i++) {
$x = (($crc >> 8) ^ ord($data[$i])) & 0xFF;
$x ^= $x >> 4;
$crc = (($crc << 8) ^ ($x << 12) ^ ($x << 5) ^ $x) & 0xFFFF;
}
return $crc;
}
}
@ -121,7 +123,7 @@ if (! function_exists('timew')) {
}
}
if (! function_exists('dwtime')) {
if (! function_exists('wtime')) {
/**
* Convert a 40 bit integer into a time.
* @see timew()