Re: YANFCQ [Yet Another Non-FastCode Question]: TDateTime -> uSec resolution
- From: "Kristofer Skaug" <nospam@xxxxxxxxx>
- Date: Fri, 29 Jul 2005 00:11:21 +0200
John Herbster wrote:
> Kristofer, This sounds familiar, so I searched
<....>
> and found the following:
Nice thread. Thanks for that!
BTW we had already fixed SecondsBetween() in a similar way.
function SecondsBetweenExt(const StartTime,EndTime:TDateTime):Int64;
begin
// Add 500 msecs to do the proper rounding...
Result := (MilliSecondsBetween(StartTime, EndTime) + 500) div 1000;
end;
Argh, my programming life was so much simpler before this floating point
stuff crept in... :-)
--
Kristofer
.
- Follow-Ups:
- Re: YANFCQ [Yet Another Non-FastCode Question]: TDateTime -> uSec resolution
- From: John Herbster
- Re: YANFCQ [Yet Another Non-FastCode Question]: TDateTime -> uSec resolution
- References:
- YANFCQ [Yet Another Non-FastCode Question]: TDateTime -> uSec resolution
- From: Kristofer Skaug
- Re: YANFCQ [Yet Another Non-FastCode Question]: TDateTime -> uSec resolution
- From: John Herbster
- YANFCQ [Yet Another Non-FastCode Question]: TDateTime -> uSec resolution
- Prev by Date: Re: Fastcode MM B&V 0.48
- Next by Date: Re: YANFCQ [Yet Another Non-FastCode Question]: TDateTime -> uSec resolution
- Previous by thread: Re: YANFCQ [Yet Another Non-FastCode Question]: TDateTime -> uSec resolution
- Next by thread: Re: YANFCQ [Yet Another Non-FastCode Question]: TDateTime -> uSec resolution
- Index(es):
Relevant Pages
|