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;
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition types.h:378
unsigned char sal_Bool
Definition types.h:38
#define SAL_OVERRIDE
C++11 "override" feature.
Definition types.h:391
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition types.h:587
#define SALHELPER_DLLPUBLIC
Definition salhelperdllapi.h:32
Definition condition.hxx:34
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition timer.hxx:93
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition timer.hxx:103
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition timer.hxx:113
A simple base implementation for reference-counted objects.
Definition simplereferenceobject.hxx:62
Helper class for easier manipulation with TimeValue.
Definition timer.hxx:39
void addTime(const TTimeValue &Delta)
Definition timer.hxx:79
TTimeValue(const TimeValue &rTimeValue)
Definition timer.hxx:62
TTimeValue(sal_uInt32 MilliSecs)
Definition timer.hxx:54
TTimeValue(sal_uInt32 Secs, sal_uInt32 Nano)
Definition timer.hxx:46
bool isEmpty() const
Definition timer.hxx:87
void normalize()
Definition timer.hxx:70
TTimeValue()
Definition timer.hxx:40
Interface for the Timer and handling the event.
Definition timer.hxx:124
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.
Time since Jan-01-1970.
Definition time.h:76
sal_uInt32 Seconds
Definition time.h:77
sal_uInt32 Nanosec
Definition time.h:78