You could do it like this

// start button

procedure TForm1.Button1Click(Sender: TObject);

begin

tp := Now;

end;

// stop button

procedure TForm1.Button2Click(Sender: TObject);

const

// i've done shortertimes to easier test

// You'd better do it with MinsPerDay constant

MinValue = 5 / SecsPerDay; // this gives 5 seconds minimum period

GridValue = 2 / SecsPerDay; // this gives 2 seconds rounding

begin

if Now - tp < MinValue then

memo1.Lines.Add(TimeToStr(MinValue))

else

memo1.Lines.Add(TimeToStr(Round((Now - tp) / GridValue) * GridValue));

end;

// start button

procedure TForm1.Button1Click(Sender

begin

tp := Now;

end;

// stop button

procedure TForm1.Button2Click(Sender

const

// i've done shortertimes to easier test

// You'd better do it with MinsPerDay constant

MinValue = 5 / SecsPerDay; // this gives 5 seconds minimum period

GridValue = 2 / SecsPerDay; // this gives 2 seconds rounding

begin

if Now - tp < MinValue then

memo1.Lines.Add(TimeToStr(

else

memo1.Lines.Add(TimeToStr(

end;