Autor Beitrag
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Sa 27.01.07 12:52 
Hallo, ich hoffe das Thema passt hier in die Sparte:

die Funktion GetTickCount gibt doch die Anzahl der Millisekunden seit das Programm läuft zurück. Der Rückgabe-Wert ist ein DWORD, also ein Doppel-Wort = 32 Bit.

Nur theoretisch: Was ist wenn man ein Programm (2^32)/1000/60/60/24 = 49,71 Tage laufen lässt?
Stürzt dann das Programm ab, gibt es einfach einen Überlauf, oder fängt die Funktion wieder von vorne an zu zählen?

Das hat wahrscheinlich noch keiner ausprobiert, aber vllt hats ja schon mal jemand gelesen oder so...
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 27.01.07 13:11 
user profile iconJakob Schöttl hat folgendes geschrieben:
Stürzt dann das Programm ab
Nein, dann stürzt Windows ab. Zumindest war das mal ein Fehler, der aber mittlerweile behoben worden ist.

Nach 49 Tagen gehts wieder bei Null los.

_________________
We are, we were and will not be.
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 27.01.07 13:15 
Viel interessanter wird es doch, wenn der Unix-Timestamp die 32 Bit überschreitet ;-):
de.wikipedia.org/wiki/Jahr-2038-Problem

Zitat:
Theoretisch betrachtet behebt auch die 64-Bit-Umstellung das Zeitstempelproblem nicht endgültig. Das Problem wird jedoch um etwa 290 Milliarden Jahre in die Zukunft verschoben.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Jakob Schöttl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Sa 27.01.07 13:24 
Aja, danke für die Antwort