Brightsign Object Reference Manual (FW 5.1) Instrukcja Użytkownika Strona 318

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 341
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 317
310
SetElapsed(seconds As Integer, milliseconds As Integer): Configures a timer to trigger once the
specified time period has elapsed. Unlike the absolute timer methods above, changes to the system clock will not
affect the period of the SetElapsed() timer.
The ifIdentity interface provides the following:
GetIdentity() As Integer
The ifSetSetMessagePort interface provides the following:
SetPort(a As Object)
Example: This code uses SetElapsed() to create a timer that triggers every 30 seconds.
Sub Main()
mp = CreateObject("roMessagePort")
timer = CreateObject("roTimer")
timer.SetPort(mp)
timer.SetElapsed(30, 0)
print "Start at "; Uptime(0)
timer.Start()
while true
ev = mp.WaitMessage(0)
if type(ev) = "roTimerEvent" then
print "Timer event received at "; Uptime(0)
timer.Start()
else
Przeglądanie stron 317
1 2 ... 313 314 315 316 317 318 319 320 321 322 323 ... 340 341

Komentarze do niniejszej Instrukcji

Brak uwag