Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <TIME.H>
Link against: estlib.lib

NULL

NULL 0L

Description

[Top]


__need_size_t

__need_size_t

Description

[Top]


__time_t_defined

__time_t_defined

Description

[Top]


_TIME_T_DEFINED

_TIME_T_DEFINED

Description

[Top]


__SOFTFP

__SOFTFP

Description

[Top]


Typedef clock_t

typedef signed int clock_t;

Description

[Top]


Typedef time_t

typedef signed int time_t;

Description

[Top]


clock(void)

IMPORT_C clock_t clock(void);

Description

Return number of clock ticks since process start. Returns the number of clock ticks elapsed. A macro constant called CLK_TCK defines the relation betwen clock tick and second (clock ticks per second).

Return value

clock_tclock_t

The number of clock ticks elapsed since start. clock_t type is defined by default as long int by most compilers.

[Top]


difftime(time_t,time_t)

IMPORT_C double difftime(time_t _time2, time_t _time1);

Description

Return difference between two times. Calculates the time difference between tim1 and tim2 in seconds.

Parameters

time_ttime_t _time2

Former time

time_ttime_t _time1

Latter time

Return value

double

The difference in seconds between the two times specified.

[Top]


mktime(struct tm *)

IMPORT_C time_t mktime(struct tm *_timeptr);

Description

Convert tm structure to time_t value. Checks the members of the tm structure passed as parameter ptm adjusting the values if the ones provided are not in the possible range or they are not complete or mistaken and then translates that structure to a time_t value (seconds elapsed since Jan 1, 1970) that is returned. The original values of tm_wday and tm_yday members of ptm are ignored and filled with the correspondent ones to the calculated date. The range of tm_mday is not checked until tm_mon and tm_year are determined.

Parameters

struct tmtm *_timeptr

Pointer to a tm structure, that contains data to be computed.

Return value

time_ttime_t

A time_t value corresponding to the date and time passed in ptm parameter. On error, a -1 value is returned.

[Top]


time(time_t *)

IMPORT_C time_t time(time_t *_timer);

Description

Intended Usage: Get current UTC time. Get the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC from the system clock.

Parameters

time_ttime_t *_timer

Location where to store the retrieved value. If this is NULL the value is not stored. But it is still returned by the function. time_t is generally defined by default to long.

Return value

time_ttime_t

Elapsed time in seconds, as described.

[Top]


strftime(char *,size_t,const char *,const struct tm *)

IMPORT_C size_t strftime(char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t);

Description

The function generates formatted text, under the control of the format format and the values stored in the time structure *tim_p.

Parameters

char *_s

size_tsize_t _maxsize

const char *_fmt

const struct tmtm *_t

Return value

size_tsize_t

It returns x, the number of characters generated, if x < n; otherwise, it returns zero, and the values stored in the array are indeterminate.

[Top]


asctime(const struct tm *)

IMPORT_C char* asctime(const struct tm *_tblock);

Description

Convert tm structure to string. Converts data pointed by tim_p to a string containing time and date in readable format.

Parameters

const struct tmtm *_tblock

Pointer to tm structure containing time and date information to be converted.

Return value

char *

A pointer to the string containing the date and time information in readable format. The string pointed is statically allocated and shared by ctime and asctime functions. Each time one of these functions is called the content of the string is overwritten.

[Top]


ctime(const time_t *)

IMPORT_C char* ctime(const time_t *_time);

Description

Convert time_t value to string. Converts tim_p to a string containing time and date adjusted to local time zone in readable format.

Parameters

const time_ttime_t *_time

pointer to a time_t value, usually returned by time function.

Return value

char *

A pointer to the string containing the date and time information in readable format. The string pointed is statically allocated and shared by ctime and asctime functions. Each time one of these functions is called the content of the string is overwritten.

[Top]


gmtime(const time_t *)

IMPORT_C struct tm* gmtime(const time_t *_timer);

Description

Convert time_t value to tm structure as UTC time. Converts timer to tm structure adjusting to UTC (formerly known as GMT) timezone.

Parameters

const time_ttime_t *_timer

pointer to a time_t value, usually returned by time function.

Return value

struct tmtm *

A pointer to a tm structure. This structure is statically allocated and shared by gmtime, localtime and ctime functions. Each time one of these functions is called the content of the structure is overwritten.

[Top]


localtime(const time_t *)

IMPORT_C struct tm* localtime(const time_t *_timer);

Description

Convert time_t value to tm structure as local time. Converts timer to tm structure adjusting to the local time zone.

Parameters

const time_ttime_t *_timer

pointer to a time_t value, usually returned by time function.

Return value

struct tmtm *

A pointer to a tm structure. This structure is statically allocated and shared by gmtime, localtime and ctime functions. Each time one of these functions is called the content of the structure is overwritten.

[Top]


asctime_r(const struct tm *,char *)

IMPORT_C char* asctime_r(const struct tm *, char *);

Description

A reentrant version of asctime(const struct tm *)asctime(const struct tm *).

Parameters

const struct tmtm *

char *

Return value

char *

[Top]


ctime_r(const time_t *,char *)

IMPORT_C char* ctime_r(const time_t *, char *);

Description

A reentrant version of ctime(const time_t *)ctime(const time_t *).

Parameters

const time_ttime_t *

char *

Return value

char *

[Top]


gmtime_r(const time_t *,struct tm *)

IMPORT_C struct tm* gmtime_r(const time_t *, struct tm *);

Description

A reentrant version of gmtime(const time_t *)gmtime(const time_t *).

Parameters

const time_ttime_t *

struct tmtm *

Return value

struct tmtm *

[Top]


localtime_r(const time_t *,struct tm *)

IMPORT_C struct tm* localtime_r(const time_t *, struct tm *);

Description

A reentrant version of localtime(const time_t *)localtime(const time_t *).

Parameters

const time_ttime_t *

struct tmtm *

Return value

struct tmtm *