help setting a timer on my health charger

i want it so when a player holds e for every second they will get health. this is what i got so far.
[lua] function ENT:Initialize()

self.Entity:SetModel(“models/props/cs_office/file_cabinet3.mdl”)
self.Entity:SetMaterial (“models/props_wasteland/wood_fence01a”)
self.Entity:PhysicsInit(SOLID_VPHYSICS)
self.Entity:SetMoveType(MOVETYPE_VPHYSICS)
self.Entity:SetSolid(SOLID_VPHYSICS)

local phys = self.Entity:GetPhysicsObject()
if phys and phys:IsValid() then
phys:Wake()
phys:SetMass( 100 ) end

self.Entity:SetNWBool(“Usable”, false)
self.Entity:SetNWBool(“Plantable”, true)
local ply = self.Entity:GetNWEntity(“owning_ent”)
self.MPLevel = 1

if self.MPLevel == 1 then
Entity = ents.Create(“prop_dynamic”);
Entity:SetPos(self:GetPos() + Vector(10, 0, 25))
Entity:SetAngles(self:GetAngles() - Angle(0, 0, 0));
Entity:SetModel(“models/props_combine/health_charger001.mdl”);
Entity:SetParent(self);
Entity:SetCollisionGroup( COLLISION_GROUP_WORLD )
Entity:SetNotSolid(true)
Entity:Spawn();
end
end

function ENT:Use (ply,activator)
local owner = self.Entity.dt.owning_ent
health = activator:Health()

if ( activator:IsPlayer() and health >=100 ) then
    activator:EmitSound( "items/medshotno1.wav" , 500, 100)
    activator:PrintMessage( HUD_PRINTCENTER, "your health is full" ) 
return false
end	


if (ply:CanAfford(5) == true) then
    ply:AddMoney(-5)
    activator:SetHealth( health + 10 )
    activator:EmitSound( "items/medshot4.wav", 500, 100)
	owner:AddMoney(5)
	Notify(owner, 0, 3, "payment is working")
	else
	Notify(ply, 1, 4, "You can't afford to heal yourself")
	return false
	end
return true
end [/lua]

all i need is to set a timer .i try with no luck . any help would be awesome

you can either use a simple timer or check os.time and use a variable against it. I don’t know what is better.

Here is a 1 sec timer.
[lua]
function secTime(ply)
–Add health here.
If ‘E’ is held down the
timer.Simple(1,secTime)
end
end
timer.Simple(1,secTime)
[/lua]