Simba Code:
{*******************************************************************************
function PrintTime(reason : String) : String;
By: PhaseCode
Description: Prints The Current Time, with the specified reason.
reason - The reason for printing the time.
Example : Writeln(PrintTime('Found Bank At')); => Found Bank At: 0:40:24
*******************************************************************************}
function PrintTime(reason : String) : String;
var
H,M,S,MS : Word;
begin
DecodeTime(Now,H,M,S,MS);
if(StrToInt(H) = 0) then
Result := (reason + ' ' + ToStr(H) + ':' + ToStr(M) + ':' + ToStr(S));
end;
This function I reuse a lot. What do you guys think?