Parity log optimization

This commit is contained in:
bergware
2022-02-27 11:28:24 +01:00
parent 9b21b1d115
commit cfb6113a68

View File

@@ -37,7 +37,7 @@ session_destroy();
function new_parity_log($timestamp) {
global $log;
return file_exists($log) ? (substr_compare(exec("tail -1 $log"),$timestamp,0,strlen($timestamp))==0 ? false : true) : true;
return file_exists($log) ? explode('|',exec("tail -1 $log"))[0]!=$timestamp : true;
}
function my_clock($time) {
if (!$time) return _('less than a minute');