File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
{ ***************************************************************************
2
2
3
- Copyright (c) 2015-2020 Kike Pérez
3
+ Copyright (c) 2015-2021 Kike Pérez
4
4
5
5
Unit : Quick.Chrono
6
6
Description : Chronometers time elapsed and estimated time to do a task
7
7
Author : Kike Pérez
8
8
Version : 1.5
9
9
Created : 27/08/2015
10
- Modified : 27/ 06/2020
10
+ Modified : 06/05/2021
11
11
12
12
This file is part of QuickLib: https://github.com/exilon/QuickLib
13
13
@@ -134,6 +134,7 @@ TChronometer = class(TInterfacedObject,IChronometer)
134
134
function GetIsRunning : Boolean;
135
135
public
136
136
constructor Create(const StartOnCreate: Boolean = false);
137
+ class function NewChrono (const StartOnCreate: Boolean = True) : IChronometer;
137
138
procedure Start ;
138
139
procedure Stop ;
139
140
procedure Reset ;
@@ -263,6 +264,11 @@ function TChronometer.GetIsRunning: Boolean;
263
264
Result := fIsRunning;
264
265
end ;
265
266
267
+ class function TChronometer.NewChrono (const StartOnCreate: Boolean = True) : IChronometer;
268
+ begin
269
+ Result := TChronometer.Create(StartOnCreate);
270
+ end ;
271
+
266
272
class function TChronometer.MillisecondsToString (aMilliseconds : Int64; LongFormat : Boolean = False) : string;
267
273
begin
268
274
Result := MillisecondsToString(aMilliseconds.ToExtended,pfTruncate,LongFormat);
You can’t perform that action at this time.
0 commit comments