Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is GetTickCount declared in Firemonkey?

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 ?

like image 301
Vlark.Lopin Avatar asked Jun 10 '16 15:06

Vlark.Lopin


People also ask

How do I make the gettickcount () function private?

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.

How to use gettickcount to build a stopwatch?

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.

What is the Windows API gettickcount function?

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.

Can I use Firemonkey with Delphi conditional compilation?

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.


1 Answers

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.

like image 108
David Heffernan Avatar answered Sep 30 '22 16:09

David Heffernan