source: trunk/libs/newlib/src/newlib/libc/time/ctime.c @ 577

Last change on this file since 577 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 730 bytes
Line 
1/*
2 * ctime.c
3 * Original Author:     G. Haley
4 */
5
6/*
7FUNCTION
8<<ctime>>---convert time to local and format as string
9
10INDEX
11        ctime
12INDEX
13        ctime_r
14
15SYNOPSIS
16        #include <time.h>
17        char *ctime(const time_t *<[clock]>);
18        char *ctime_r(const time_t *<[clock]>, char *<[buf]>);
19
20DESCRIPTION
21Convert the time value at <[clock]> to local time (like <<localtime>>)
22and format it into a string of the form
23. Wed Jun 15 11:38:07 1988\n\0
24(like <<asctime>>).
25
26RETURNS
27A pointer to the string containing a formatted timestamp.
28
29PORTABILITY
30ANSI C requires <<ctime>>.
31
32<<ctime>> requires no supporting OS subroutines.
33*/
34
35#include <time.h>
36
37#ifndef _REENT_ONLY
38
39char *
40ctime (const time_t * tim_p)
41{
42  return asctime (localtime (tim_p));
43}
44
45#endif
Note: See TracBrowser for help on using the repository browser.