![]() |
GetTickDiff
Hallo
hat jemand den Code für GetTickDiff ? Er ist normalerweise in IDGlobal, aber wenn ich den dazunehme, bekomme ich lauter Compilerfehler. Gruß Gargano |
AW: GetTickDiff
Sind bei dir denn keine Indy-Quellcodes vorhanden?
Was für Fehler? Mathematik? (Differenz zwischen zwei Werten ... das könnte man bestimmt auch selber berechnen :angle2:) [add]
Delphi-Quellcode:
Wobei ich persönlich auch einfach den Überlauf ausnutzen würde. :gruebel:
function GetTickDiff(const AOldTickCount, ANewTickCount: LongWord): LongWord;
{$IFDEF USE_INLINE}inline;{$ENDIF} begin {This is just in case the TickCount rolled back to zero} if ANewTickCount >= AOldTickCount then begin Result := ANewTickCount - AOldTickCount; end else begin Result := High(LongWord) - AOldTickCount + ANewTickCount; end; end;
Delphi-Quellcode:
function GetTickDiff(const AOldTickCount, ANewTickCount: LongWord): LongWord; inline;
begin Result := LongWord(ANewTickCount - AOldTickCount); // LongWord(), da ich nicht weiß, ob sich das Inline da richtig verhält end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:39 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz