Ab, glaube ich, XE2 würde es noch die Möglichkeit der TStopWatch geben:
Delphi-Quellcode:
var
MyStopWatch : System.Diagnostics.TStopwatch;
ElapsedTimeInMilliSeconds : Int64;
ElapsedTimeInSeconds,
ElapsedTimeInMinutes,
ElapsedTimeInHours,
ElapsedTimeInDays : Double;
begin
MyStopWatch := TStopwatch.StartNew;
Sleep(10000);
MyStopWatch.Stop;
ElapsedTimeInMilliSeconds := MyStopWatch.ElapsedMilliseconds;
ElapsedTimeInSeconds := ElapsedTimeInMilliSeconds / 1000;
ElapsedTimeInMinutes := ElapsedTimeInSeconds / 60;
ElapsedTimeInHours := ElapsedTimeInMinutes / 60;
ElapsedTimeInDays := ElapsedTimeInHours / 24;
end;