|
|
|
|
|
- Differences between the Timer and TimerSys functions
- Locking or non-locking operations
- Execution time of procedure
- Process for calling the timer
- Process for calling the timer
- Timer and sibling windows
- Timer and Thread
- Timer and Windows service
Timer (Function) In french: Timer Periodically and automatically calls a WLanguage procedure. Called in the procedure, Timer is used to identify the timer that started the procedure. The sequence of periodic calls to a procedure is called timer. This periodic call will be stopped by EndTimer. Tip: In most cases, use the TimerSys function .
PROCEDURE Affiche_Heure()
SAI_HEURE1 = TimeSys()
IF Timer("Affiche_Heure", 100, 1) = 0 THEN
Error("Création du timer impossible")
END
Syntax
Starting a procedure periodically Hide the details
<Result> = Timer(<Procedure name> , <Period>)
<Result>: Integer - Number of the opened timer (<Number> if this parameter is specified),
- 0 if the timer was not opened.
<Procedure name>: Character string Name of WLanguage procedure that will be started periodically.Note: If this parameter corresponds to the name of an internal procedure, the name of the internal procedure must not be enclosed in quotation marks.. <Period>: Integer or Duration Time (in hundredths of a second) between two calls to the procedure by timer. The period precision depends on the pending system status. This parameter can correspond to: - an integer corresponding to the number of hundredths of a second,
- a Duration variable,
- the duration in a readable format (e.g., '1s' or '10cs').
Related Examples:
|
Unit examples (WINDEV): The alarms
[ + ] Implementing an alarm to display an alert message in the title bar of the active window (regardless of the application). The following topics are presented: 1/ The system functions (retrieving the handle of a window) 2/ Triggering a process according to a given frequency (timers)
|
|
Training (WINDEV): WD Screen Saver
[ + ] This example illustrates the creation of a screen saver with the WLanguage functions. The following topics are presented in this example: 1/ the periodic call to a procedure ("timers") 2/ the management of Windows events 3/ the system functions (call to Windows APIs) To use the screen saver: - Rename the executable (.EXE) to.SCR - Copy the file to the directory of Windows (Ex: C:\WINDOWS) - Open the window for the display properties of the desktop - Choose the "Screen Saver" tab - Select the screen saver generated by WINDEV
|
|
Training (WINDEV): WD Who is locking
[ + ] This example explains how to notify to the users of a HFSQL database in network "who" is locking an inaccessible record. The following topics are presented in this example: 1/ management of concurrent accesses 2/ automatic refresh by timer 3/ management of a "system" file to store information about the locks. Summary of the example supplied with WINDEV: This example, powered by WINDEV, includes 2 projects: - WD Who is locking: test application that manages a "client" file in network - WD Supervisor of locks: management tool used to view the existing locks and to force the unlocking if necessary. An edit form may have been left opened by a user for quite a long time ; this may interfere with the other users. The 'Free' button sends a message to the relevant user and asks him to free the record. The 'Unlock!' button is used to force the unlocking of the record. Caution: This operation will send a message forcing the closing of the application that performed the lock.
|
|
Unit examples (WINDEV Mobile): Managing the timers
[ + ] Implementing a timer: - start a timer - run a code whenever the timer is called - stop a timer
|
|
Unit examples (WINDEV Mobile): The Chrono functions
[ + ] Using the WLanguage "Chrono" functions. These functions are used to calculate the time passed between the start (ChronoStart) and the end (ChronoEnd).
|
|
Unit examples (WEBDEV): Managing the timers
[ + ] This example explains how to implement a timer and it allows you to: - Start a timer - Run a code whenever the timer is called - Stop a timer
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|