AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Frage zum Zeitstempel mit now

Ein Thema von jupiter4065139 · begonnen am 24. Sep 2013 · letzter Beitrag vom 28. Sep 2013
Antwort Antwort
Seite 2 von 2     12   
jupiter4065139

Registriert seit: 22. Mär 2013
23 Beiträge
 
#11

AW: Frage zum Zeitstempel mit now

  Alt 24. Sep 2013, 16:59
Windows hat ein scheduling system, da kannst dich um bestimte Uhrzeiten aufrufen lassen...
? Was willst Du damit jetzt sagen?
  Mit Zitat antworten Zitat
hathor
(Gast)

n/a Beiträge
 
#12

AW: Frage zum Zeitstempel mit now

  Alt 24. Sep 2013, 18:25
SetWaitableTimer
Findest Du hier im Forum:
http://www.delphipraxis.net/968614-post10.html
  Mit Zitat antworten Zitat
hathor
(Gast)

n/a Beiträge
 
#13

AW: Frage zum Zeitstempel mit now

  Alt 28. Sep 2013, 12:57
@jupiter4065139
Dein Beispiel tut bei mir nichts.

Ich habe hier was Besseres mit SetWaitableTimer:

Delphi-Quellcode:
procedure Wait(lNumberOfSeconds : Longint);
var
 lBusy, hTimer : Cardinal;
 liDueTime : LARGE_INTEGER;
begin
  hTimer := CreateWaitableTimer(nil, True, 'WaitableTimer');
  if hTimer = 0 then Exit;
  liDueTime.QuadPart := -10000000 * lNumberOfSeconds;
  SetWaitableTimer(hTimer, TLargeInteger(liDueTime), 0, nil, nil, False);

  repeat
    lBusy := MsgWaitForMultipleObjects(1, hTimer, False, INFINITE, QS_ALLINPUT);
        Application.ProcessMessages;
    Until lBusy = WAIT_OBJECT_0;

    // Close the handles when you are done with them.
   CloseHandle(hTimer);
End;

procedure TForm1.Button1Click(Sender: TObject);
var i : Integer;
begin
    Memo1.lines.add(' START: '+TimeToStr(now));
    for I := 0 to 4 do // 5 Minuten
         begin
            wait(60); //60 Sec
            Memo1.lines.add(IntToStr(i)+' - '+TimeToStr(now));
         end;
    Memo1.lines.add(' READY: '+TimeToStr(now));
end;
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:09 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz