mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 11:19:26 +02:00
Rewrites the GetTickCount interfaces to preserve backwards compatibility, to more closely resamble the WinAPI and also avoid confusion
git-svn-id: trunk@33563 -
This commit is contained in:
parent
965ae5eba4
commit
027d11ac6a
@ -8,7 +8,7 @@ uses
|
||||
SysUtils;
|
||||
|
||||
function NowUTC: TDateTime;
|
||||
function GetTickCount: Int64;
|
||||
function GetTickCount64: QWord;
|
||||
|
||||
implementation
|
||||
|
||||
@ -31,9 +31,9 @@ begin
|
||||
result := systemTimeToDateTime(SystemTime);
|
||||
end;
|
||||
|
||||
// GetTickCount64 is better, but we need to check the Windows version to use it
|
||||
function GetTickCount: Int64;
|
||||
function GetTickCount64: QWord;
|
||||
begin
|
||||
// GetTickCount64 is better, but we need to check the Windows version to use it
|
||||
Result := Windows.GetTickCount();
|
||||
end;
|
||||
|
||||
@ -97,7 +97,7 @@ begin
|
||||
result := systemTimeToDateTime(SystemTime);
|
||||
end;
|
||||
|
||||
function GetTickCount: Int64;
|
||||
function GetTickCount64: QWord;
|
||||
var
|
||||
tp: TTimeVal;
|
||||
begin
|
||||
@ -111,7 +111,7 @@ begin
|
||||
Result := Now;
|
||||
end;
|
||||
|
||||
function GetTickCount: Int64;
|
||||
function GetTickCount64: QWord;
|
||||
begin
|
||||
Result := Trunc(Now * 24 * 60 * 60 * 1000);
|
||||
end;
|
||||
|
@ -71,7 +71,8 @@ function PredefinedClipboardFormat(
|
||||
|
||||
function MsgKeyDataToShiftState(KeyData: PtrInt): TShiftState;
|
||||
|
||||
function GetTickCount(): Int64;
|
||||
function GetTickCount(): DWord;
|
||||
function GetTickCount64(): QWord;
|
||||
|
||||
{$IFDEF DebugLCL}
|
||||
function GetTickStep: DWord;
|
||||
@ -136,9 +137,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetTickCount(): Int64;
|
||||
function GetTickCount(): DWord;
|
||||
begin
|
||||
Result := lazutf8sysutils.GetTickCount();
|
||||
Result := DWord(lazutf8sysutils.GetTickCount64());
|
||||
end;
|
||||
|
||||
function GetTickCount64(): QWord;
|
||||
begin
|
||||
Result := lazutf8sysutils.GetTickCount64();
|
||||
end;
|
||||
|
||||
{$IFDEF DebugLCL}
|
||||
|
Loading…
Reference in New Issue
Block a user