alsa.audio: limit the supported frequencies to common set
[AROS.git] / compiler / stdc / asctime.c
blob37a6d4be4853f65f866883f94dc729abb480026b
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Convert a time into a string.
6 */
8 #include "__stdc_intbase.h"
10 /*****************************************************************************
12 NAME */
13 #include <time.h>
15 char * asctime (
17 /* SYNOPSIS */
18 const struct tm * tm)
20 /* FUNCTION
21 The asctime() function converts the broken-down time value tm
22 into a string.
24 See asctime_r() for details.
26 INPUTS
27 tm - The broken down time
29 RESULT
30 A statically allocated buffer with the converted time. Note that
31 the contents of the buffer might get lost with the call of any of the
32 date and time functions.
34 NOTES
35 The returned string is buffered per stdc.library base.
37 EXAMPLE
38 time_t tt;
39 struct tm * tm;
40 char * str;
42 // Get time
43 time (&tt);
45 // Break time up
46 tm = localtime (&tt);
48 // Convert to string
49 str = asctime (tm);
51 BUGS
53 SEE ALSO
54 time(), ctime(), gmtime(), localtime()
56 INTERNALS
58 ******************************************************************************/
60 struct StdCIntBase *StdCBase = (struct StdCIntBase *)__aros_getbase_StdCBase();
62 strftime (StdCBase->timebuffer, 26, "%C\n", tm);
64 return StdCBase->timebuffer;
65 } /* asctime */