I am using multi device in Delphi and I am building an android app. I need to use GetTickCount
that was declared in Windows .
Does it exist somewhere in firemonkey or is there an alternative ?
1. Use the API Text Viewer to obtain the Declare statement for the GetTickCount function. Choose Private scope. Copy and paste it into the applications General Declarations area (new code is italicized). Option Explicit. Dim StartTime As Variant. Dim EndTime As Variant. Dim ElapsedTime As Variant.
Quick Example 1: Using GetTickCount to Build a Stopwatch. 1. Use the API Text Viewer to obtain the Declare statement for the GetTickCount function. Choose Private scope. Copy and paste it into the applications General Declarations area (new code is italicized). Option Explicit. Dim StartTime As Variant.
The Windows API GetTickCount function returns the number of milliseconds since the system (computer) was started. The simplest example follows: Note that GetTickCount returns 32-bit DWORD so it wraps every 49.7 days.
Although not officially supported, it is possible for a Delphi application to use both FireMonkey and VCL units. It is possible to embed a FireMonkey form in a VCL application and vice versa using unsupported techniques. However, I haven’t tested those scenarios with my conditional compilation code.
GetTickCount
is a Windows function and so does not exist on other platforms. For your cross platform needs you should use TStopWatch
from System.Diagnostics
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With