Thierry Laborde from Embarcadero created a stop watch app for Android and IOS using Delphi XE5 Firemonkey and has released the source code. It actually uses a TStopWatch object which is found in the System.Diagnostics unit to accomplish this. It is a pretty simple but effective app that also uses the premium styles for it’s custom look. Full source code is provided for the app and the app is also available from the Google Play app store. You can take a look at the TStopWatch object here:
type
TStopwatch = record
strict private
class var FFrequency: Int64;
class var FIsHighResolution: Boolean;
class var TickFrequency: Double;
strict private
FElapsed: Int64;
FRunning: Boolean;
FStartTimeStamp: Int64;
function GetElapsed: TTimeSpan;
function GetElapsedDateTimeTicks: Int64;
function GetElapsedMilliseconds: Int64;
function GetElapsedTicks: Int64;
class procedure InitStopwatchType; static;
public
class function Create: TStopwatch; static;
class function GetTimeStamp: Int64; static;
procedure Reset;
procedure Start;
class function StartNew: TStopwatch; static;
procedure Stop;
property Elapsed: TTimeSpan read GetElapsed;
property ElapsedMilliseconds: Int64 read GetElapsedMilliseconds;
property ElapsedTicks: Int64 read GetElapsedTicks;
class property Frequency: Int64 read FFrequency;
class property IsHighResolution: Boolean read FIsHighResolution;
property IsRunning: Boolean read FRunning;
end;
Head over to Embarcadero and check out the blog post and then download the source.
Thanks to speak about my App on your website.
Some others will come soon.
Regards.
Thierry.