__attribute__如何理解?

/*******************************************************************************
* Function Name : Time_ConvUnixToCalendar(time_t t)
* Description : 转换UNIX时间戳为日历时间
* Input : u32 t 当前时间的UNIX时间戳
* Output : None
* Return : struct tm
*******************************************************************************/
struct tm Time_ConvUnixToCalendar(time_t t)
{
struct tm *t_tm;
t_tm = localtime(&t);
t_tm->tm_year += 1900; //localtime转换结果的tm_year是相对值,需要转成绝对值
return *t_tm;
}

extern _ARMABI struct tm *localtime(const time_t * /*timer*/) __attribute__((__nonnull__(1)));

localtime实现了时间戳转换为日历时间,其原理是什么?

可能涉及到得知识:EABI,应用程序二进制接口(application binary interface,ABI) 描述了应用程序和操作系统之间,一个应用和它的库之间,或者应用的组成部分之间的低层接口。

相关链接:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0039d/index.html

转载于:https://www.cnblogs.com/LideAiYaner-1wn/p/5408736.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值