Difference between revisions of "longtimer"

From Free Pascal wiki
Jump to navigationJump to search
(LongTimer information)
(Unnecessary duplicate. Redirect to LongTimer)
 
Line 1: Line 1:
===LongTimer===
+
#REDIRECT [[LongTimer]]
====Summary====
 
*The Tlongtimer component is a descendent of TIdleTimer component, and shares its properties and methods.
 
*Additional properties affect when the OnTimer event is fired.
 
*With LongTimer, the OnTimer event is fired only ''once'' - every time the interval you set is reached.
 
 
 
[[File:longtimer_oi.png]]
 
====Properties====
 
*Enumerated types
 
#IntervalType = (lt1Daily,lt2Weekly,lt3Monthly)
 
#WeeklyDay = (lt1Monday,lt2Tuesday,lt3Wednesday,lt4Thursday,lt5Friday,lt6Saturday,lt7Sunday)
 
#SampleInterval = (lt1Everyminute,lt2Every5minutes,lt3Every10Minutes,lt4Every30Minutes,lt5Every45Minutes)
 
*Others
 
#Daily24Hour - 0 = Midnight, 1 = 1am ... 14 = 2pm etc.
 
#MonthlyDate - 1 = 1st, 2 = 2nd etc.
 
====Methods====
 
*The OnTimer event will only fire according to the above properties
 
 
 
*To fire the Ontimer every day at approx. 10am
 
<syntaxhighlight>
 
LongTimer1.IntervalType:=lt1Daily;
 
LongTimer1.Daily24Hour:=10;
 
LongTimer1.Enabled:=TRUE;
 
</syntaxhighlight>
 
 
 
*To fire the Ontimer on the last day of every month at approx. 10am
 
<syntaxhighlight>
 
LongTimer1.IntervalType:=lt3Monthly;
 
LongTimer1.MonthlyDate:=31;
 
LongTimer1.Daily24Hour:=10;
 
LongTimer1.Enabled:=TRUE;
 
</syntaxhighlight>
 
Note that if a month has less than 31 days, LongTimer will automatically compensate
 
====Download====
 
*Download the TlongTimer component from the Lazarus CCR Repository
 
 
 
[[Category:Components]]
 

Latest revision as of 10:50, 13 October 2014

Redirect to: