Unit Unit1;
Interface
Uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
Type
TForm1 = Class(TForm)
Procedure FormCreate(Sender: TObject);
Private
{ Private declarations }
Public
{ Public declarations }
End;
Var
Form1: TForm1;
Implementation
{$R *.dfm}
Procedure TForm1.FormCreate(Sender: TObject);
Var
Count,
Hours,
Minutes:integer;
Begin
Count := GetTickCount;
Hours := ((Count div 1000) div 60) div 60;
Minutes := ((Count div 1000) div 60) Mod 60;
showmessage('Datorn har varit igång i: ' + IntTOStr(Hours) + 'timmar och ' + IntToStr(Minutes)+'minuter');
End;
End.