Changeset 56b308e in mainline
- Timestamp:
- 2012-04-23T22:28:57Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d3e3a71
- Parents:
- f6cb995
- Location:
- uspace/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/time.c
rf6cb995 r56b308e 861 861 } 862 862 863 /** 864 * Equivalent to asctime(localtime(clock)). 865 * 866 * @param timer Time to convert. 867 * @return Pointer to a statically allocated string holding the date. 868 */ 869 char *ctime(const time_t *timer) 870 { 871 struct tm *loctime = localtime(timer); 872 if (loctime == NULL) { 873 return NULL; 874 } 875 return asctime(loctime); 876 } 877 863 878 /** @} 864 879 */ -
uspace/lib/c/include/sys/time.h
rf6cb995 r56b308e 83 83 extern char *asctime(const struct tm *timeptr); 84 84 extern struct tm *localtime(const time_t *timer); 85 extern char *ctime(const time_t *timer); 85 86 extern size_t strftime(char *restrict s, size_t maxsize, 86 87 const char *restrict format, const struct tm *restrict tm); -
uspace/lib/posix/time.c
rf6cb995 r56b308e 400 400 401 401 /** 402 * Equivalent to asctime(localtime(clock)).403 *404 * @param timer Time to convert.405 * @return Pointer to a statically allocated string holding the date.406 */407 char *posix_ctime(const time_t *timer)408 {409 struct tm *loctime = localtime(timer);410 if (loctime == NULL) {411 return NULL;412 }413 return asctime(loctime);414 }415 416 /**417 402 * Reentrant variant of ctime(). 418 403 * -
uspace/lib/posix/time.h
rf6cb995 r56b308e 96 96 extern char *posix_asctime_r(const struct tm *restrict timeptr, 97 97 char *restrict buf); 98 extern char *posix_ctime(const time_t *timer);99 98 extern char *posix_ctime_r(const time_t *timer, char *buf); 100 99 … … 128 127 129 128 #define asctime_r posix_asctime_r 130 #define ctime posix_ctime131 129 #define ctime_r posix_ctime_r 132 130
Note:
See TracChangeset
for help on using the changeset viewer.