Skip to content

Commit 12c1407

Browse files
ferdymercurypcanal
authored andcommitted
[core] improve by two the ttimer resolution
Fixes #8582
1 parent db2244d commit 12c1407

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

core/base/inc/Rtypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ enum ESysConstants {
6060
kMAXSIGNALS = 16,
6161
kMAXPATHLEN = 8192,
6262
kBUFFERSIZE = 8192,
63-
kItimerResolution = 10 // interval-timer resolution in ms
63+
kItimerResolution = 5 ///< interval-timer resolution in ms (used for TThread, TTimer, Emit, Connect, etc.)
6464
};
6565

6666
enum EColor { kWhite =0, kBlack =1, kGray =920,

core/base/inc/TTimer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// Timeout() signal and call connected slots. //
3030
// //
3131
// Minimum timeout interval is defined in TSystem::ESysConstants as //
32-
// kItimerResolution (currently 10 ms). //
32+
// kItimerResolution (currently 5 ms). //
3333
// //
3434
// Signal/slots example: //
3535
// TTimer *timer = new TTimer(); //

core/base/src/TTimer.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ You can use this class in one of the following ways:
2828
appropriate methods. Then when the time is up it will emit a
2929
Timeout() signal and call connected slots.
3030
31-
Minimum timeout interval is defined in TSystem::ESysConstants as
32-
`kItimerResolution` (currently 10 ms).
31+
Minimum timeout interval is defined in Rtypes.h ESysConstants as
32+
`kItimerResolution` (currently 5 ms).
3333
3434
Signal/slots example:
3535
~~~{.cpp}
@@ -54,7 +54,7 @@ class TSingleShotCleaner : public TTimer {
5454
private:
5555
TList *fGarbage;
5656
public:
57-
TSingleShotCleaner() : TTimer(10, kTRUE) { fGarbage = new TList(); }
57+
TSingleShotCleaner() : TTimer(5, kTRUE) { fGarbage = new TList(); }
5858
~TSingleShotCleaner() override
5959
{
6060
fGarbage->Delete();
@@ -81,7 +81,7 @@ class TSingleShotCleaner : public TTimer {
8181
////////////////////////////////////////////////////////////////////////////////
8282
/// Create timer that times out in ms milliseconds. If milliSec is 0
8383
/// then the timeout will be the minimum timeout (see TSystem::ESysConstants,
84-
/// i.e. 10 ms). If mode == kTRUE then the timer is synchronous else
84+
/// i.e. 5 ms). If mode == kTRUE then the timer is synchronous else
8585
/// a-synchronous. The default is synchronous. Add a timer to the system
8686
/// eventloop by calling TurnOn(). Set command to be executed from Notify()
8787
/// or set the object whose HandleTimer() method will be called via Notify(),

core/thread/inc/TThread.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ class TThreadCleaner {
202202

203203
class TThreadTimer : public TTimer {
204204
public:
205-
// if this time is less or equal to kItimerResolution, TUnixSystem::DispatchOneEvent i
205+
// if this time is less or equal to kItimerResolution, TUnixSystem::DispatchOneEvent
206206
// can not exit and have its caller react to the other TTimer's actions (like the request
207207
// to stop the event loop) until there is another type of event.
208-
TThreadTimer(Long_t ms = kItimerResolution + 10);
208+
TThreadTimer(Long_t ms = kItimerResolution + 5);
209209
Bool_t Notify() override;
210210
};
211211

0 commit comments

Comments
 (0)