How do you detect a double kill?

How do you detect a double kill / How do you detect when someone gets 2 kills in a second

When the get a kill, you mark that time on the player, and if they get another kill, if it’s been fast enough since the first kill then it’s a double kill.

-Pseudocode-
OnPlayerDeath()
if(attacker.lastkill<CurTiime()+1)then
–Double Kill
end
attacker.lastkill = CurTime()

[lua]
local PK = attacker:IsPlayer() && attacker:Frags()
timer.Simple(1, function()
if (PK && attacker) then
if (attacker:Frags() - PK => 2) then
PrintMessage(HUD_PRINTCENTER, string.upper(attacker:Nick()) … " Double Kill!"
end
end
end)[/lua]

[lua]hook.Add(“PlayerDeath”, “DKStuff”, function(Victim, Inflictor, Killer)
local CurrentTime = CurTime()
local DKMaxTime = 5

if Killer.LastKillTime != nil then
	if Killer.LastKillTime + DKMaxTime &lt;= CurrentTime then
		-- Double Kill!
		PrintMessage(HUD_PRINTTALK, "Player " .. Killer:Name() .. " has performed a double kill!")
	end
end
Killer.LastKillTime = CurrentTime

end)[/lua]

Not the most beautiful code ever, but it should work.