Line | |
---|
1 | /**
|
---|
2 | * \file cf_util.h
|
---|
3 | *
|
---|
4 | * \author myusgun <myusgun@gmail.com>
|
---|
5 | *
|
---|
6 | * \brief 유틸
|
---|
7 | *
|
---|
8 | * \example util.c
|
---|
9 | */
|
---|
10 | #ifndef __CF_UTIL_H__
|
---|
11 | #define __CF_UTIL_H__
|
---|
12 |
|
---|
13 | #include "cf_base.h"
|
---|
14 |
|
---|
15 | #define CF_UTIL_DATETIME_LENGTH (sizeof ("0000-00-00 00:00:00.000") - 1)
|
---|
16 |
|
---|
17 | typedef enum
|
---|
18 | {
|
---|
19 | SUN = 0, /**< 일요일 */
|
---|
20 | MON, /**< 월요일 */
|
---|
21 | TUE, /**< 화요일 */
|
---|
22 | WED, /**< 수요일 */
|
---|
23 | THU, /**< 목요일 */
|
---|
24 | FRI, /**< 금요일 */
|
---|
25 | SAT, /**< 토요일 */
|
---|
26 | } CF_UTIL_WEEK;
|
---|
27 |
|
---|
28 | typedef struct __cf_util_datetime__
|
---|
29 | {
|
---|
30 | int year; /**< 년. */
|
---|
31 | int month; /**< 월. */
|
---|
32 | int day; /**< 일. */
|
---|
33 | CF_UTIL_WEEK week; /**< 요일. */
|
---|
34 |
|
---|
35 | int hour; /**< 시간. */
|
---|
36 | int min; /**< 분. */
|
---|
37 | int sec; /**< 초. */
|
---|
38 | int usec; /**< 마이크로 초. */
|
---|
39 | } CF_UTIL_DATETIME;
|
---|
40 |
|
---|
41 | #ifdef __cplusplus
|
---|
42 | extern "C" {
|
---|
43 | #endif
|
---|
44 |
|
---|
45 | CF_EXPORT int
|
---|
46 | CF_Util_GetSystemError (void);
|
---|
47 |
|
---|
48 | CF_EXPORT int
|
---|
49 | CF_Util_GetCurrentTime (CF_UTIL_DATETIME * dt);
|
---|
50 |
|
---|
51 | CF_EXPORT int
|
---|
52 | CF_Util_GetTimeString (const CF_UTIL_DATETIME * dt,
|
---|
53 | char * str);
|
---|
54 |
|
---|
55 | #ifdef __cplusplus
|
---|
56 | }
|
---|
57 | #endif
|
---|
58 |
|
---|
59 | #endif // #ifndef __CF_UTIL_H__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.