📄 pg_time.c
字号:
///////////////////////////////////////////////////////////////
//
//
// PGOS : A Portable,Configable Embedded System Kernel
//
//
//
// This is an open source project under GPL lincence
//
// Version 0.9.0 ---- Development Snopshot
//
// File name : pg_time.c : Time functions implemention
// History :
//
// 2005-07-24 First build by X.K. @ PGOS Team
//
/////////////////////////////////////////////////////////////////
#include "pgos.h"
#if PG_TIME_SUPPORT == 1
DWORD pgos_time_sec ;
DWORD pgos_time_min ;
DWORD pgos_time_hour ;
DWORD pgos_time_day ;
VOID pgos_tim_clrtime( )
{
pgos_time_sec = 0 ;
pgos_time_min = 0 ;
pgos_time_hour = 0;
pgos_time_day = 0 ;
}
VOID pgos_tim_process( )
{
pgos_time_sec ++ ;
if( pgos_time_sec % 60 == 0 )
{
pgos_time_min ++ ;
if( pgos_time_min % 60 == 0 )
{
pgos_time_hour ++ ;
if( pgos_time_hour % 24 == 0 )
{
pgos_time_day ++ ;
}
}
}
}
DWORD pgos_tim_getsec( )
{
return pgos_time_sec ;
}
DWORD pgos_tim_getmin( )
{
return pgos_time_min ;
}
DWORD pgos_tim_gethour( )
{
return pgos_time_hour ;
}
DWORD pgos_tim_getday( )
{
return pgos_time_day ;
}
#endif // TIME_SUPPORT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -