|
LibreOffice
LibreOffice 7.2 SDK C/C++ API Reference
|
Go to the documentation of this file.
24 #ifndef INCLUDED_SALHELPER_TIMER_HXX
25 #define INCLUDED_SALHELPER_TIMER_HXX
56 Seconds = MilliSecs / 1000;
57 Nanosec = (MilliSecs % 1000) * 1000000L;
72 if ( Nanosec > 1000000000 )
74 Seconds += Nanosec / 1000000000;
75 Nanosec %= 1000000000;
89 return ( ( Seconds == 0 ) && ( Nanosec == 0 ) );
188 virtual
void SAL_CALL onShot() = 0;
218 friend class TimerManager;
223 #endif // INCLUDED_SALHELPER_TIMER_HXX
Timer(const TTimeValue &Time)
Constructor.
void addTime(const TTimeValue &Time)
Adds Time to the 'fire time'.
#define SALHELPER_DLLPUBLIC
Definition: salhelperdllapi.h:32
void addTime(const TTimeValue &Delta)
Definition: timer.hxx:79
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:103
sal_Bool isTicking() const
Returns sal_True if timer is running.
sal_uInt32 Seconds
Definition: time.h:73
A simple base implementation for reference-counted objects.
Definition: simplereferenceobject.hxx:62
sal_uInt32 Nanosec
Definition: time.h:74
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:93
sal_Bool isExpired() const
Is the timer expired?
Helper class for easier manipulation with TimeValue.
Definition: timer.hxx:39
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:587
void stop()
Abort timer prematurely.
sal_Bool expiresBefore(const Timer *pTimer) const
Does pTimer expires before us?
TTimeValue()
Definition: timer.hxx:40
Definition: condition.hxx:34
TTimeValue getRemainingTime() const
Returns the remaining time before timer expiration relative to now.
unsigned char sal_Bool
Definition: types.h:38
TTimeValue(const TimeValue &rTimeValue)
Definition: timer.hxx:62
TTimeValue(sal_uInt32 Secs, sal_uInt32 Nano)
Definition: timer.hxx:46
void setAbsoluteTime(const TTimeValue &Time)
Set the absolute time when the timer should fire.
virtual ~Timer() SAL_OVERRIDE
Destructor.
void setRemainingTime(const TTimeValue &Remaining)
Set the time to fire to 'now' + Remaining.
Interface for the Timer and handling the event.
Definition: timer.hxx:124
void normalize()
Definition: timer.hxx:70
#define SAL_OVERRIDE
C++11 "override" feature.
Definition: types.h:391
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:378
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:113
bool isEmpty() const
Definition: timer.hxx:87
TTimeValue(sal_uInt32 MilliSecs)
Definition: timer.hxx:54
Timer(const TTimeValue &Time, const TTimeValue &RepeatTime)
Constructor.
void setRemainingTime(const TTimeValue &Remaining, const TTimeValue &Repeat)
Set the time to fire to 'now' + Remaining with repeat interveal Repeat.