/[projects]/dao/DelphiScanner/TimingHelper.pas
ViewVC logotype

Annotation of /dao/DelphiScanner/TimingHelper.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3076 - (hide annotations) (download)
Thu Jul 28 20:03:18 2016 UTC (7 years, 10 months ago) by torben
File size: 681 byte(s)
Code sync
1 torben 3076 unit TimingHelper;
2    
3     interface
4    
5     type
6     TTimingHelper = class
7     private
8     timeStart, timeEnd : TDateTime;
9    
10     public
11     constructor create();
12     procedure start();
13     procedure stop(lbl : string);
14    
15    
16     end; // End of TTimingHelper
17    
18     implementation
19    
20     uses SysUtils,DateUtils,Windows;
21    
22     constructor TTimingHelper.create();
23     begin
24    
25     timeStart := Now;
26     end;
27    
28     procedure TTimingHelper.start();
29     begin
30     timeStart := Now;
31     end;
32    
33    
34     procedure TTimingHelper.stop(lbl : string);
35     begin
36     timeEnd := Now;
37    
38     OutputDebugString(
39     PChar( lbl + ': ' + IntToStr( DateUtils.MilliSecondsBetween(timeend, timeStart) ))
40     ) ;
41    
42     timeStart := Now;
43    
44     end;
45    
46     end.

  ViewVC Help
Powered by ViewVC 1.1.20