Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Milisekunden jetzt! (https://www.delphipraxis.net/1864-milisekunden-jetzt.html)

theomega 28. Dez 2002 15:23


Milisekunden jetzt!
 
Hallo
ich habe folgenden Code gschrieben um die aktuelle Zeit in Milisekunden herauszubekommen. Nur der Code gibt immer 0 zurück:

Delphi-Quellcode:
function gettime:longword;
var now,hour,min,sec,msec:word;
parent:TDateTIme;
z:longword;
begin;
parent := now;
decodetime(parent,hour,min,sec,msec);
z := msec+(sec*1000)+(min*60*1000)+(hour*60*60*1000);
result := z;
end;
Warum ist das so?
Wo ist der Fehler?

Danke

TO

theomega 28. Dez 2002 15:43

hab es rausgefunden: statt
now muß es time heißen.

Warum weiß ich aber auch nicht!

Chewie 28. Dez 2002 15:51

now liefert datum & Uhrzeit, time nur die Uhrzeit.

CalganX 28. Dez 2002 15:55

Problem: Du hast eine Variable, die now heißt!!!

Chris


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:47 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