I sometimes like doing it this way (which is unnecessarily complex but whatever):
const
Time = 5; //Seconds
var
Timer: integer;
procedure ActivateServer;
begin
Timer := Time;
end;
procedure AppOnIdle(Ticks: cardinal);
begin
Timer := Timer - 1;
if (Timer = 0) then begin
//Do stuff here
Timer := Time;
end;
end;