GetProcessArgv  Chapter 3: Message Objects and Methods

Chapter 2: Bridged Functions

getTime

Description

Gets the current time in the form of a text string. The format is identical to the output of the standard API ctime.

Syntax

int getTime(string *timeStr, int flag);

Parameter

Description

timeStr

Pointer to a string to received the formatted time string output.

flag

Reserved for future use. Must be 0.

Return value

Integer.

Returns 1 for success, and 0 for failure.

Examples

Example 26

string my_time;
int rv;
rv = getTime(&my_time, 0);
if (rv == 0)
{
	erm("Unable to get time!!!");
}
else
{
	erm("Current time is [%s]", my_time);
}




Copyright © 2005. Sybase Inc. All rights reserved. Chapter 3: Message Objects and Methods

View this book as PDF