Functions
Timefns
Libc

bada provides a subset of newlib's Timefns APIs. For detailed description, please refer to the manual on the website of newlib's Timefns (http://sourceware.org/newlib/libc.html#Timefns).

Functions

char * asctime (const struct tm *clock)
clock_t clock (void)
char * ctime (const time_t *clock)
char * ctime_r (const time_t *clock, char *buf)
double difftime (time_t tim1, time_t tim2)
struct tm * gmtime (const time_t *clock)
struct tm * gmtime_r (const time_t *clock, struct tm *res)
struct tm * localtime (time_t *clock)
struct tm * localtime_r (time_t *clock, struct tm *res)
time_t mktime (struct tm *timp)
size_t strftime (char *s, size_t maxsize, const char *format, const struct tm *timp)
time_t time (time_t *t)
void tzset (void)

Function Documentation

char* asctime ( const struct tm *  clock)

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#asctime).

Since:
1.0
clock_t clock ( void  )

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#clock).

Since:
1.0
char* ctime ( const time_t *  clock)

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#ctime).

Since:
1.0
char* ctime_r ( const time_t *  clock,
char *  buf 
)

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#ctime).

Since:
2.0
double difftime ( time_t  tim1,
time_t  tim2 
)

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#difftime).

Since:
1.0
struct tm* gmtime ( const time_t *  clock) [read]

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#gmtime).

Since:
1.0
struct tm* gmtime_r ( const time_t *  clock,
struct tm *  res 
) [read]

As per bada rules, the newlib APIs related to re-entrancy are not supported. Therefore, gmtime_r() is not supported.
Instead of using gmtime_r(), it is recommended to use gmtime().

Since:
1.0
struct tm* localtime ( time_t *  clock) [read]

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#localtime).

Compatibility:
This method has compatibility issues with different bada API versions prior to 1.2.
For more information, see here.
Since:
1.0
struct tm* localtime_r ( time_t *  clock,
struct tm *  res 
) [read]

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#localtime).

Since:
2.0
time_t mktime ( struct tm *  timp)

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#mktime).

Since:
1.0
size_t strftime ( char *  s,
size_t  maxsize,
const char *  format,
const struct tm *  timp 
)

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#strftime).

Since:
1.0
time_t time ( time_t *  t)

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#time).

Since:
1.0
void tzset ( void  )

Please refer to the website of newlib (http://sourceware.org/newlib/libc.html#tzseet).

Since:
2.0

Copyright © 2011 Samsung Electronics Co., Ltd. All rights reserved.