git status
This commit is contained in:
parent
f0ae35c43e
commit
8d92a1ae28
|
@ -411,7 +411,7 @@ extern "C"
|
||||||
{
|
{
|
||||||
char buf[40] = { 0 };
|
char buf[40] = { 0 };
|
||||||
|
|
||||||
get_current_time(buf);
|
hg_get_current_time(buf);
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -408,7 +408,7 @@ extern "C"
|
||||||
return g_unk_statu;
|
return g_unk_statu;
|
||||||
}
|
}
|
||||||
|
|
||||||
void get_current_time(char* tmbuf, struct tm* t)
|
void hg_get_current_time(char* tmbuf, struct tm* t)
|
||||||
{
|
{
|
||||||
#if defined(WIN32) || defined(_WIN64)
|
#if defined(WIN32) || defined(_WIN64)
|
||||||
static long bias = -1;
|
static long bias = -1;
|
||||||
|
@ -439,11 +439,11 @@ extern "C"
|
||||||
if (tmbuf)
|
if (tmbuf)
|
||||||
sprintf(tmbuf, "%04d-%02d-%02d %02d:%02d:%02d", l->tm_year + 1900, l->tm_mon + 1, l->tm_mday, l->tm_hour, l->tm_min, l->tm_sec);
|
sprintf(tmbuf, "%04d-%02d-%02d %02d:%02d:%02d", l->tm_year + 1900, l->tm_mon + 1, l->tm_mday, l->tm_hour, l->tm_min, l->tm_sec);
|
||||||
}
|
}
|
||||||
void get_current_time_w(wchar_t* tmbuf, struct tm* t)
|
void hg_get_current_time_w(wchar_t* tmbuf, struct tm* t)
|
||||||
{
|
{
|
||||||
struct tm tmp = { 0 }, * l = &tmp;
|
struct tm tmp = { 0 }, * l = &tmp;
|
||||||
|
|
||||||
get_current_time(nullptr, l);
|
hg_get_current_time(nullptr, l);
|
||||||
if (t)
|
if (t)
|
||||||
*t = *l;
|
*t = *l;
|
||||||
if (tmbuf)
|
if (tmbuf)
|
||||||
|
|
|
@ -482,8 +482,8 @@ extern "C"{
|
||||||
// t - 用于接收原始的时间结构
|
// t - 用于接收原始的时间结构
|
||||||
//
|
//
|
||||||
// Return: void
|
// Return: void
|
||||||
void get_current_time(char* tmbuf, struct tm* t = nullptr);
|
void hg_get_current_time(char* tmbuf, struct tm* t = nullptr);
|
||||||
void get_current_time_w(wchar_t* tmbuf, struct tm* t = nullptr);
|
void hg_get_current_time_w(wchar_t* tmbuf, struct tm* t = nullptr);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue