mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-04-12 02:02:25 +02:00
Refactor.
This commit is contained in:
parent
a6ad2e7d4b
commit
c05a505b9c
@ -444,18 +444,15 @@ if ($sessionCounter == $seenSessionCounter && $sessionUse > $seenSessionUse)
|
|||||||
$percent = 1;
|
$percent = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$lastTime = $lastTime .' (' . $ad['accessed'] . ')';
|
|
||||||
$now = $now . ' (' . strftime('%Y-%m-%d %H:%M:%S', $now). ')';
|
|
||||||
$dev_s_or_p = $deviation . ' secs or '.round(100 * $percent) . '%';
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'seen' => $seenTs,
|
'seen' => $seenTs,
|
||||||
'this' => $ts,
|
'this' => $ts,
|
||||||
'delta' => $tsDiff,
|
'delta' => $tsDiff,
|
||||||
'secs' => $tsDelta,
|
'secs' => $tsDelta,
|
||||||
'accessed' => $lastTime,
|
'accessed' => sprintf('%s (%s)', $lastTime, $ad['accessed']),
|
||||||
'now' => $now,
|
'now' => sprintf('%s (%s)'. $now, strftime('%Y-%m-%d %H:%M:%S', $now)),
|
||||||
'elapsed' => $elapsed,
|
'elapsed' => $elapsed,
|
||||||
'deviation' => $dev_s_or_p,
|
'deviation' => sprintf('%s secs or %s%%', $deviation, round(100 * $percent)),
|
||||||
);
|
);
|
||||||
$msg = 'Timestamp';
|
$msg = 'Timestamp';
|
||||||
foreach ($data as $k => $v) $msg .= " $k=$v";
|
foreach ($data as $k => $v) $msg .= " $k=$v";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user