Einzelnen Beitrag anzeigen

Tyrael Y.

Registriert seit: 28. Jul 2003
Ort: Stuttgart
1.093 Beiträge
 
Delphi 2007 Professional
 
#17

Re: wie auf bestimmte zeit reagieren??

  Alt 24. Jan 2008, 14:41
Wenn du GetSystemTime benutzt hast, dann hast du ja jetzt einen Record, wo die Daten drin stehen, wenn du jetzt damit Addieren/Subtrahieren möchtest, dann musst du wie in der Hilfe vorgegeben vorgehen....

SYSTEMTIME ist der Record den GetSystemTime liefert

Zitat:
Remarks
It is not recommended that you add and subtract values from the SYSTEMTIME structure to obtain relative times. Instead, you should

1. Convert the SYSTEMTIME structure to a FILETIME structure.
2. Copy the resulting FILETIME structure to a ULARGE_INTEGER structure.
3. Use normal 64-bit arithmetic on the ULARGE_INTEGER value.

Edit (Das ganze mal auf "Deutsch"):

1. GetSystemTime benutzen
2. den Record hier heraus in SystemTimeToFileTime als Parameter übergeben
3. mit memcpy den Record aus SystemTimeToFileTime auf einen int64 kopieren

-> jetzt hast du einen int64 mit dem du rechnen kannst
Levent Yildirim
Erzeugung von Icons aus Bildern:IconLev
  Mit Zitat antworten Zitat