21 #ifndef INCLUDED_SALHELPER_TIMER_HXX
22 #define INCLUDED_SALHELPER_TIMER_HXX
53 Seconds = MilliSecs / 1000;
54 Nanosec = (MilliSecs % 1000) * 1000000L;
69 if ( Nanosec > 1000000000 )
71 Seconds += Nanosec / 1000000000;
72 Nanosec %= 1000000000;
86 return ( ( Seconds == 0 ) && ( Nanosec == 0 ) );
185 virtual
void SAL_CALL onShot() = 0;
215 friend class TimerManager;
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:374
unsigned char sal_Bool
Definition: types.h:34
#define SAL_OVERRIDE
C++11 "override" feature.
Definition: types.h:387
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:558
#define SALHELPER_DLLPUBLIC
Definition: salhelperdllapi.h:28
Definition: condition.hxx:31
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:90
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:100
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:110
A simple base implementation for reference-counted objects.
Definition: simplereferenceobject.hxx:58
Helper class for easier manipulation with TimeValue.
Definition: timer.hxx:36
void addTime(const TTimeValue &Delta)
Definition: timer.hxx:76
TTimeValue(const TimeValue &rTimeValue)
Definition: timer.hxx:59
TTimeValue(sal_uInt32 MilliSecs)
Definition: timer.hxx:51
TTimeValue(sal_uInt32 Secs, sal_uInt32 Nano)
Definition: timer.hxx:43
bool isEmpty() const
Definition: timer.hxx:84
void normalize()
Definition: timer.hxx:67
TTimeValue()
Definition: timer.hxx:37
Interface for the Timer and handling the event.
Definition: timer.hxx:121
TTimeValue getRemainingTime() const
Returns the remaining time before timer expiration relative to now.
Timer(const TTimeValue &Time)
Constructor.
void setRemainingTime(const TTimeValue &Remaining, const TTimeValue &Repeat)
Set the time to fire to 'now' + Remaining with repeat interveal Repeat.
void stop()
Abort timer prematurely.
virtual ~Timer() SAL_OVERRIDE
Destructor.
Timer(const TTimeValue &Time, const TTimeValue &RepeatTime)
Constructor.
sal_Bool isExpired() const
Is the timer expired?
void addTime(const TTimeValue &Time)
Adds Time to the 'fire time'.
sal_Bool expiresBefore(const Timer *pTimer) const
Does pTimer expires before us?
void setAbsoluteTime(const TTimeValue &Time)
Set the absolute time when the timer should fire.
sal_Bool isTicking() const
Returns sal_True if timer is running.
void setRemainingTime(const TTimeValue &Remaining)
Set the time to fire to 'now' + Remaining.
sal_uInt32 Seconds
Definition: time.h:67
sal_uInt32 Nanosec
Definition: time.h:68