A script-enabled browser is required for this page to function properly.

FIND_TIMER Built-in

Description

Searches the list of timers and returns a timer ID when it finds a valid timer with the given name. You must define an appropriately typed variable to accept the return value. Define the variable with a type of Timer.

Syntax

FUNCTION FIND_TIMER
(timer_name VARCHAR2);

Built-in Type unrestricted function

Returns Timer

Enter Query Mode yes

Parameters

timer_name 
 
Specifies a valid VARCHAR2 timer name.

FIND_TIMER Example

/*

** Built-in: FIND_TIMER
** Example: If the timer exists, reset it. Otherwise create
** it.
*/
PROCEDURE Reset_Timer_Interval( Timer_Name VARCHAR2,
Timer_Intv NUMBER ) IS
tm_id Timer;
tm_interval NUMBER;
BEGIN
/*
** User gives the interval in seconds, the timer subprograms
** expect milliseconds
*/
tm_interval := 1000 * Timer_Intv;
/* Lookup the timer by name */
tm_id := Find_Timer(Timer_Name);
/* If timer does not exist, create it */
IF Id_Null(tm_id) THEN
tm_id := Create_Timer(Timer_Name,tm_interval,NO_REPEAT);
/*
** Otherwise, just restart the timer with the new interval
*/
ELSE
Set_Timer(tm_id,tm_interval,NO_REPEAT);
END IF;
END;


Referencing Oracle Forms Objects by Internal ID