21 #ifndef INCLUDED_SALHELPER_TIMER_HXX 22 #define INCLUDED_SALHELPER_TIMER_HXX 53 Seconds = MilliSecs / 1000L;
54 Nanosec = (MilliSecs % 1000) * 1000000L;
69 if ( Nanosec > 1000000000 )
71 Seconds += Nanosec / 1000000000;
72 Nanosec %= 1000000000;
86 return ( ( Seconds == 0 ) && ( Nanosec == 0 ) );
138 void SAL_CALL start();
142 void SAL_CALL stop();
146 sal_Bool SAL_CALL isTicking()
const;
150 sal_Bool SAL_CALL isExpired()
const;
154 sal_Bool SAL_CALL expiresBefore(
const Timer* pTimer )
const;
158 void SAL_CALL setAbsoluteTime(
const TTimeValue& Time );
162 void SAL_CALL setRemainingTime(
const TTimeValue& Remaining );
171 void SAL_CALL addTime(
const TTimeValue& Time );
185 virtual void SAL_CALL onShot() = 0;
215 friend class TimerManager;
220 #endif // INCLUDED_SALHELPER_TIMER_HXX #define SAL_OVERRIDE
C++11 "override" feature.
Definition: types.h:409
sal_uInt32 Nanosec
Definition: time.h:68
TTimeValue(const TimeValue &rTimeValue)
Definition: timer.hxx:59
TTimeValue m_aExpired
holds the time of expiration of this timer.
Definition: timer.hxx:195
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:396
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:578
TTimeValue m_aTimeOut
holds (initial) expiration time of this timer.
Definition: timer.hxx:191
Interface for the Timer and handling the event.
Definition: timer.hxx:120
unsigned char sal_Bool
Definition: types.h:38
TTimeValue()
Definition: timer.hxx:37
sal_uInt32 Seconds
Definition: time.h:67
Definition: condition.hxx:30
Helper class for easier manipulation with TimeValue.
Definition: timer.hxx:35
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:100
void addTime(const TTimeValue &Delta)
Definition: timer.hxx:76
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:90
TTimeValue(sal_uInt32 MilliSecs)
Definition: timer.hxx:51
#define SALHELPER_DLLPUBLIC
Definition: salhelperdllapi.h:28
TTimeValue m_aRepeatDelta
holds the time interveal of successive expirations.
Definition: timer.hxx:199
bool isEmpty() const
Definition: timer.hxx:84
A simple base implementation for reference-counted objects.
Definition: simplereferenceobject.hxx:57
TTimeValue(sal_uInt32 Secs, sal_uInt32 Nano)
Definition: timer.hxx:43
Timer * m_pNext
Pointer to the next timer (to fire).
Definition: timer.hxx:203
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:110
void normalize()
Definition: timer.hxx:67