tkernel_2/kernel/tkernel/src/time.h | bare source | permlink (0.03 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * T-Kernel 2.0 Software Package 4: * 5: * Copyright 2011 by Ken Sakamura. 6: * This software is distributed under the latest version of T-License 2.x. 7: *---------------------------------------------------------------------- 8: * 9: * Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17. 10: * Modified by TRON Forum(http://www.tron.org/) at 2015/06/01. 11: * 12: *---------------------------------------------------------------------- 13: */ 14: 15: /* 16: * time.h 17: * 18: * C language: date and time 19: */ 20: 21: #ifndef _TIME_ 22: #define _TIME_ 23: 24: #include "stdtype.h" 25: 26: #ifdef __cplusplus 27: extern "C" { 28: #endif 29: 30: #ifdef __size_t 31: typedef __size_t size_t; 32: #undef __size_t 33: #endif 34: 35: #define NULL 0 36: 37: typedef int clock_t; /* Processor usage time */ 38: typedef int time_t; /* Date and time */ 39: 40: struct tm { 41: int tm_sec; /* Seconds: 0 - 61 42: (including up to two leap seconds) */ 43: int tm_min; /* Minutes: 0 - 59 */ 44: int tm_hour; /* Hours: 0 - 23 */ 45: int tm_mday; /* Days: 1 - 31 */ 46: int tm_mon; /* Months (from January): 0 - 11 */ 47: int tm_year; /* Years (from 1900): 0 - */ 48: int tm_wday; /* Days (from Sunday): 0 - 6 */ 49: int tm_yday; /* Days (from January 1): 0 - 365 */ 50: int tm_isdst; /* Summer time flag: >0 for summer time, 51: =0 for normal time, <0 for unknown */ 52: }; 53: 54: #ifdef __cplusplus 55: } 56: #endif 57: #endif /* _TIME_ */