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 | /* |
---|
7 | FUNCTION |
---|
8 | <<ctime>>---convert time to local and format as string |
---|
9 | |
---|
10 | INDEX |
---|
11 | ctime |
---|
12 | INDEX |
---|
13 | ctime_r |
---|
14 | |
---|
15 | SYNOPSIS |
---|
16 | #include <time.h> |
---|
17 | char *ctime(const time_t *<[clock]>); |
---|
18 | char *ctime_r(const time_t *<[clock]>, char *<[buf]>); |
---|
19 | |
---|
20 | DESCRIPTION |
---|
21 | Convert the time value at <[clock]> to local time (like <<localtime>>) |
---|
22 | and format it into a string of the form |
---|
23 | . Wed Jun 15 11:38:07 1988\n\0 |
---|
24 | (like <<asctime>>). |
---|
25 | |
---|
26 | RETURNS |
---|
27 | A pointer to the string containing a formatted timestamp. |
---|
28 | |
---|
29 | PORTABILITY |
---|
30 | ANSI C requires <<ctime>>. |
---|
31 | |
---|
32 | <<ctime>> requires no supporting OS subroutines. |
---|
33 | */ |
---|
34 | |
---|
35 | #include <time.h> |
---|
36 | |
---|
37 | #ifndef _REENT_ONLY |
---|
38 | |
---|
39 | char * |
---|
40 | ctime (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.