Autor Beitrag
g1o2k4
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 493



BeitragVerfasst: So 13.08.06 20:08 
hallo

wie lese ich die systemzeit aus ?
ich möchte beim initialisierungsprozess des programms immer schreiben was grade geschieht (in einer konsole) und davor soll die systemzeit stehen.
am besten mit 100stel sekunden
bsp:

<21:05:11.730> text text text


oder sowas in der art.

danke grüße g1o
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 13.08.06 20:11 
ausblenden Delphi-Quelltext
1:
Time();					

_________________
Markus Kinzler.
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: So 13.08.06 20:11 
Schau doch erstmal in der Delphihilfe:
GetTime
das ist eine FUnktion, und die gibt TDateTime zurück.
das konvertierst du zu einem string mit einer Funktion wie DateTimeTo...

Wie gesagt schau in der Hilfe nach
g1o2k4 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 493



BeitragVerfasst: So 13.08.06 21:05 
ok danke !

aber wie lasse ich die 100stel sekunden noch dahinter anzeigen ?


für alle die den code wollen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.Button1Click(Sender: TObject);
begin
  memo1.text:=memo1.Text + '<'+ gettime +'>' + #13#10;
end;

function TForm1.gettime:string;
var a:tdatetime;
begin
  a:=time();
  result:=timetostr(a);
end;



grüße g1o
oldmax
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 380


D3 Prof, D4 Prof
BeitragVerfasst: Mo 14.08.06 08:19 
Titel: Zeit mit 100stel Sekunden
Hi
Soweit ich es mit meiner bescheidenen Delphi3 Version beurteilen kann, gibt es den Typ TTimeStamp, der löst bis 1000stel auf.
Schau mal in die Hilfe, da ich zur Zeit grad kein Delphi hab...
Gruß oldmax

_________________
Zier dich nich so, ich krieg dich schon....
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 14.08.06 09:10 
mach es euch doch nicht so schwer. Einfach mit FormatDatetime:
ausblenden Delphi-Quelltext
1:
string := formatdatetime('dd.mm.yyyy hh:nn:ss:zzz',now);					

Das wars !

_________________
In the beginning was the word.
And the word was content-type: text/plain.