4 #ifndef INCLUDED_SALHELPER_TIMER_HXX
5 #define INCLUDED_SALHELPER_TIMER_HXX
36 Seconds = MilliSecs / 1000;
37 Nanosec = (MilliSecs % 1000) * 1000000L;
52 if ( Nanosec > 1000000000 )
54 Seconds += Nanosec / 1000000000;
55 Nanosec %= 1000000000;
69 return ( ( Seconds == 0 ) && ( Nanosec == 0 ) );
121 void SAL_CALL start();
125 void SAL_CALL stop();
129 sal_Bool SAL_CALL isTicking()
const;
133 sal_Bool SAL_CALL isExpired()
const;
137 sal_Bool SAL_CALL expiresBefore(
const Timer* pTimer )
const;
141 void SAL_CALL setAbsoluteTime(
const TTimeValue& Time );
145 void SAL_CALL setRemainingTime(
const TTimeValue& Remaining );
154 void SAL_CALL addTime(
const TTimeValue& Time );
168 virtual void SAL_CALL onShot() = 0;
198 friend class TimerManager;
203 #endif // INCLUDED_SALHELPER_TIMER_HXX
bool isEmpty() const
Definition: timer.hxx:67
Time since Jan-01-1970.
Definition: time.h:56
unsigned char sal_Bool
Definition: types.h:18
TTimeValue(sal_uInt32 MilliSecs)
Definition: timer.hxx:34
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:93
TTimeValue m_aExpired
holds the time of expiration of this timer.
Definition: timer.hxx:178
TTimeValue m_aRepeatDelta
holds the time interveal of successive expirations.
Definition: timer.hxx:182
TTimeValue(sal_uInt32 Secs, sal_uInt32 Nano)
Definition: timer.hxx:26
void addTime(const TTimeValue &Delta)
Definition: timer.hxx:59
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:73
sal_uInt32 Seconds
Definition: time.h:57
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:83
TTimeValue()
Definition: timer.hxx:20
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:567
sal_uInt32 Nanosec
Definition: time.h:58
A simple base implementation for reference-counted objects.
Definition: simplereferenceobject.hxx:41
Timer * m_pNext
Pointer to the next timer (to fire).
Definition: timer.hxx:186
TTimeValue m_aTimeOut
holds (initial) expiration time of this timer.
Definition: timer.hxx:174
#define SAL_OVERRIDE
C++11 "override" feature.
Definition: types.h:371
Helper class for easier manipulation with TimeValue.
Definition: timer.hxx:18
TTimeValue(const TimeValue &rTimeValue)
Definition: timer.hxx:42
Interface for the Timer and handling the event.
Definition: timer.hxx:103
#define SALHELPER_DLLPUBLIC
Definition: salhelperdllapi.h:12
void normalize()
Definition: timer.hxx:50
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:358