21 #ifndef INCLUDED_SALHELPER_TIMER_HXX 22 #define INCLUDED_SALHELPER_TIMER_HXX 53 Seconds = MilliSecs / 1000L;
54 Nanosec = (MilliSecs % 1000) * 1000000L;
75 if ( Nanosec > 1000000000 )
77 Seconds += Nanosec / 1000000000;
78 Nanosec %= 1000000000;
92 return ( ( Seconds == 0 ) && ( Nanosec == 0 ) );
144 void SAL_CALL start();
148 void SAL_CALL stop();
152 sal_Bool SAL_CALL isTicking()
const;
156 sal_Bool SAL_CALL isExpired()
const;
160 sal_Bool SAL_CALL expiresBefore(
const Timer* pTimer )
const;
164 void SAL_CALL setAbsoluteTime(
const TTimeValue& Time );
168 void SAL_CALL setRemainingTime(
const TTimeValue& Remaining );
177 void SAL_CALL addTime(
const TTimeValue& Time );
191 virtual void SAL_CALL onShot() = 0;
221 friend class TimerManager;
226 #endif // INCLUDED_SALHELPER_TIMER_HXX #define SAL_OVERRIDE
C++11 "override" feature.
Definition: types.h:405
TTimeValue m_aTimeOut
holds (initial) exparation time of this timer.
Definition: timer.hxx:197
Definition: condition.hxx:29
void addTime(const TTimeValue &Delta)
Definition: timer.hxx:82
Timer * m_pNext
Pointer to the next timer (to fire).
Definition: timer.hxx:209
Interface for the Timer and handling the event.
Definition: timer.hxx:126
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:392
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:598
TTimeValue(const TimeValue &rTimeValue)
Definition: timer.hxx:65
sal_uInt32 Nanosec
Definition: time.h:68
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:96
TTimeValue(sal_uInt32 MilliSecs)
Definition: timer.hxx:51
TTimeValue m_aExpired
holds the time of exparation of this timer.
Definition: timer.hxx:201
unsigned char sal_Bool
Definition: types.h:39
TTimeValue m_aRepeatDelta
holds the time interveal of successive expirations.
Definition: timer.hxx:205
A simple base implementation for reference-counted objects.
Definition: simplereferenceobject.hxx:57
TTimeValue(sal_uInt32 Secs, sal_uInt32 Nano)
Definition: timer.hxx:43
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:116
#define SALHELPER_DLLPUBLIC
Definition: salhelperdllapi.h:28
TTimeValue(const TTimeValue &rTimeValue)
Definition: timer.hxx:59
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:106
sal_uInt32 Seconds
Definition: time.h:67
bool isEmpty() const
Definition: timer.hxx:90
void normalize()
Definition: timer.hxx:73
TTimeValue()
Definition: timer.hxx:37
Helper class for easier manipulation with TimeValue.
Definition: timer.hxx:35