giga Well-Known Member Licensed User Longtime User Oct 21, 2021 #1 Maybe a simple answer but, How do you verify a Timer is firing when using it in a non-ui application? Does the log reflect the count? Thank you, Last edited: Oct 21, 2021
Maybe a simple answer but, How do you verify a Timer is firing when using it in a non-ui application? Does the log reflect the count? Thank you,
Solution EnriqueGonzalez Oct 21, 2021 Timer doesn't depend on javafx and you can log and it will show on the terminal. Just be careful to call startmessageloop before the app shutdown itself. Code: Copy Dim clock as timer Public sub app_start(args() as string) Clock.initialize ("clock",1000) Clock.enabled = true StartMessageLoop End sub Private sub clock_tick Log("tick') End sub
Timer doesn't depend on javafx and you can log and it will show on the terminal. Just be careful to call startmessageloop before the app shutdown itself. Code: Copy Dim clock as timer Public sub app_start(args() as string) Clock.initialize ("clock",1000) Clock.enabled = true StartMessageLoop End sub Private sub clock_tick Log("tick') End sub
EnriqueGonzalez Expert Licensed User Longtime User Oct 21, 2021 #2 Timer doesn't depend on javafx and you can log and it will show on the terminal. Just be careful to call startmessageloop before the app shutdown itself. Code: Copy Dim clock as timer Public sub app_start(args() as string) Clock.initialize ("clock",1000) Clock.enabled = true StartMessageLoop End sub Private sub clock_tick Log("tick') End sub Upvote 0 Solution
Timer doesn't depend on javafx and you can log and it will show on the terminal. Just be careful to call startmessageloop before the app shutdown itself. Code: Copy Dim clock as timer Public sub app_start(args() as string) Clock.initialize ("clock",1000) Clock.enabled = true StartMessageLoop End sub Private sub clock_tick Log("tick') End sub
giga Well-Known Member Licensed User Longtime User Oct 21, 2021 #3 Thanks, EnriqueGonzalez as always. I wrote my question wrong. What you gave me works but what I am after is the numeric count 1,2,3,4,5... I guess I need to use counter with the clock or timer to format it? Upvote 0
Thanks, EnriqueGonzalez as always. I wrote my question wrong. What you gave me works but what I am after is the numeric count 1,2,3,4,5... I guess I need to use counter with the clock or timer to format it?
DonManfred Expert Licensed User Longtime User Oct 21, 2021 #4 giga said: what I am after is the numeric count 1,2,3,4,5... Click to expand... You need to increment a value like you wish. A count is not part of the Timer function. Create a global integer value, set it to 0 in app_start and increment it in the timer_tick. Check the value whenever you need to know the actual counter... Upvote 0
giga said: what I am after is the numeric count 1,2,3,4,5... Click to expand... You need to increment a value like you wish. A count is not part of the Timer function. Create a global integer value, set it to 0 in app_start and increment it in the timer_tick. Check the value whenever you need to know the actual counter...