_LARGE_INTEGER til Int64 med lowpart og highpart
Jeg har posted et spørgsmål før men her er der et andet problem..jeg kan ikke gennemskue hvordan man skal komme uden om
QueryPerformancefrequency(p);
da p er _LARGE_INTEGER; og QuweyPerformancefrequency skal bruge Int64 men Int64 understøtter ikke Lowpart og highpart.
er der nogen måde at konvertere dette eller hvad skal man gøre?
function wintimefloat:extended;
var
p:_LARGE_INTEGER;
e:extended;
begin
if performancecountfreq = 0 then begin
QueryPerformancefrequency(p);
e := p.lowpart;
if e < 0 then e := e + highdwordconst;
performancecountfreq := ((p.highpart*highdwordconst)+e);
end;
if queryperformancecounter(p) then begin
e := p.lowpart;
if e < 0 then e := e + highdwordconst;
result := ((p.highpart*highdwordconst)+e)/performancecountfreq;
end else begin
result := timegettime/1000;
end;
end;
function wintimefloat:extended;
var
p:_LARGE_INTEGER;
e:extended;
begin
if performancecountfreq = 0 then begin
function wintimefloat:extended;
var
p:_LARGE_INTEGER;
e:extended;
begin
if performancecountfreq = 0 then begin
QueryPerformancefrequency(p);
e := p.lowpart;
if e < 0 then e := e + highdwordconst;
performancecountfreq := ((p.highpart*highdwordconst)+e);
end;
if queryperformancecounter(p) then begin
e := p.lowpart;
if e < 0 then e := e + highdwordconst;
result := ((p.highpart*highdwordconst)+e)/performancecountfreq;
end else begin
result := timegettime/1000;
end;
end;
e := p.lowpart;
if e < 0 then e := e + highdwordconst;
performancecountfreq := ((p.highpart*highdwordconst)+e);
end;
if queryperformancecounter(p) then begin
e := p.lowpart;
if e < 0 then e := e + highdwordconst;
result := ((p.highpart*highdwordconst)+e)/performancecountfreq;
end else begin
result := timegettime/1000;
end;
end;
