⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gmtime.c

📁 Newlib 嵌入式 C库 标准实现代码
💻 C
字号:
/* * gmtime.c * Original Author:	G. Haley * * Converts the calendar time pointed to by tim_p into a broken-down time * expressed as Greenwich Mean Time (GMT). Returns a pointer to a structure * containing the broken-down time, or a null pointer if GMT is not * available. *//*FUNCTION<<gmtime>>---convert time to UTC traditional formINDEX	gmtimeANSI_SYNOPSIS	#include <time.h>	struct tm *gmtime(const time_t *<[clock]>);	struct tm *gmtime_r(const time_t *<[clock]>, struct tm *<[res]>);TRAD_SYNOPSIS	#include <time.h>	struct tm *gmtime(<[clock]>)	const time_t *<[clock]>;	struct tm *gmtime_r(<[clock]>, <[res]>)	const time_t *<[clock]>;	struct tm *<[res]>;DESCRIPTION<<gmtime>> takes the time at <[clock]> representing the numberof elapsed seconds since 00:00:00 on January 1, 1970, UniversalCoordinated Time (UTC, also known in some countries as GMT,Greenwich Mean time) and converts it to a <<struct tm>>representation.<<gmtime>> constructs the traditional time representation in staticstorage; each call to <<gmtime>> or <<localtime>> will overwrite theinformation generated by previous calls to either function.RETURNSA pointer to the traditional time representation (<<struct tm>>).PORTABILITYANSI C requires <<gmtime>>.<<gmtime>> requires no supporting OS subroutines.*/#include <stdlib.h>#include <time.h>#define _GMT_OFFSET 0#ifndef _REENT_ONLYstruct tm *_DEFUN (gmtime, (tim_p),	_CONST time_t * tim_p){  _REENT_CHECK_TM(_REENT);  return gmtime_r (tim_p, (struct tm *)_REENT_TM(_REENT));}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -