kill()  Chapter 6: Route Calls

Chapter 5: General Objects and Methods

set()

Description

Sets or changes a timer interval and starts the timer.

Syntax

int set(int internal);int set(long interval);

Parameter

Description

interval

The timer interval. Use an integer to set the time in seconds. Use a long datatype to set the time in milliseconds

Return value

Integer. Returns 1 for success, and 0 for failure.

Usage

Pointer to object

Object

int seconds;ptimer->set(seconds);long m_seconds;ptimer->set (m seconds);

int seconds;my_timer.set(seconds);long m_seconds;

my_timer.set(m_seconds);

Examples

Example 70

ptimer1->set(0);
//in milliseconds:
long m_sec;
m_sec = 500;
ptimer1->set(m_sec);
//in seconds:
int sec1;
sec1 = 2;
ptimer1->set(sec1);




Copyright © 2005. Sybase Inc. All rights reserved. Chapter 6: Route Calls

View this book as PDF