91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 18KB
    文件類型: .gz
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-05-24
  • 語言: C/C++
  • 標(biāo)簽: Linux??器源代碼??

資源簡介

無意間從一個論壇里面看到的,放到這里分享,版權(quán)屬于作者。 作者姓名:熊第彬;Email:mushan520@gmail.com

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?“get_time.h“


/*?get?the?time?on?server
???return:?the?ascii?string?of?time??NULL?on?error
???argument:?time_buf?the?buffer?to?store?time_string
*/

char?*get_time_str(char?*time_buf)
{
time_t now_sec;
struct?tm *time_now;
if( time(&now_sec)?==?-1)
{
perror(“time()?in?get_time.c“);
return?NULL;
}
if((time_now?=?gmtime(&now_sec))?==?NULL)
{
perror(“l(fā)ocaltime?in?get_time.c“);
return?NULL;
}
char?*str_ptr?=?NULL;
if((str_ptr?=?asctime(time_now))?==?NULL)
{
perror(“asctime?in?get_time.c“);
return?NULL;
}
strcat(time_buf?str_ptr);
return?time_buf;
}

評論

共有 條評論