StoneAge/gmsv/include/handletime.h

58 lines
1.2 KiB
C
Raw Normal View History

2018-08-07 15:51:35 +08:00
#ifndef __HANDLETIME_H__
#define __HANDLETIME_H__
#include <sys/time.h>
#undef EXTERN
#ifdef __HANDLETIME_C__
#define EXTERN
#else /*__HANDLETIME_C__*/
#define EXTERN extern
#endif
EXTERN struct timeval NowTime;
EXTERN int DEBUG_ADJUSTTIME;
BOOL setNewTime( void );
#ifdef _ASSESS_SYSEFFICACY
void Assess_InitSysEfficacy( void);
void Assess_SysEfficacy( int flg);
void ASSESS_getSysEfficacy( float *TVsec);
#ifdef _ASSESS_SYSEFFICACY_SUB
void Assess_SysEfficacy_sub( int flg, int loop);
void ASSESS_getSysEfficacy_sub( float *TVsec, int loop);
#endif
#endif
// WON REM
//struct tm *localtime(const time_t *timep);
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1>HiO<69><4F>LS<4C><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
/* <20><><EFBFBD><EFBFBD>150(<28><>)*60=9000 =750*12 ƥ LS1 */
/* LS1200<30><30><EFBFBD><EFBFBD> LS1 */
/* LS100 ƥ LS1 */
typedef struct tagLSTIME
{
int year;
int day;
int hour;
}LSTIME;
#define NIGHT_TO_MORNING 700
#define MORNING_TO_NOON 930
#define NOON_TO_EVENING 200
#define EVENING_TO_NIGHT 300
typedef enum
{
LS_NIGHT = 0,
LS_MORNING ,
LS_NOON ,
LS_EVENING ,
}LSTIME_SECTION;
void RealTimeToLSTime(long t , LSTIME *lstime);
/*void LSTimeToRealTime( LSTIME *lstime, long *t);*/
LSTIME_SECTION getLSTime (LSTIME *lstime);
#endif