Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

ActiveTimer / DeactiveTimer

ActiveTimer( <oTimer> ) / DeactiveTimer( <oTimer> )

Controls activation and deactivation of a historical timer.

ActiveTimer / DeactiveTimerAdvPL
01 · OVERVIEW

Overview

Historical eAdvpl reference, §4.1–4.3, p. 26. Syntax depends on that environment’s definitions; it does not establish compatibility with every current Protheus include. These functions receive an existing timer object. Creation and action definition are separate steps; activation should not execute the task repeatedly in a blocking loop. The example separates start and stop hooks. Do not transfer these function names to TTimer without checking its actual methods. (Guia de referência eAdvpl, s.d., ref. 1)

02 · SYNTAX

Syntax

ActiveTimer( <oTimer> ) / DeactiveTimer( <oTimer> )

Parameters

oTimer
ObjectRequired

Existing timer compatible with the historical environment.

Return value

No business return value is documented for this interface operation.

03 · PRACTICAL EXAMPLE

Commented example

// Fragments for different events; the screen created oTimer.
// When interaction starts:
ActiveTimer(oTimer)

// When closing the screen, before disposing its objects:
DeactiveTimer(oTimer)
Expected result

Shows two lifecycle hooks; running them immediately in sequence does not demonstrate timer ticks. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Prevent action reentry and stop the timer before destroying referenced controls. Timer intervals guarantee neither clock precision nor safe concurrency.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. Guia de referência eAdvpl. §4.1–4.3, p. 26. Referência histórica; autoria e compatibilidade atual não confirmadas. Accessed on 2026-10-25.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha