有朋友能帮我解释这段代码吗?C调用的

2025-02-24 09:58:51
推荐回答(1个)
回答1:

long time(long *tloc)本函数给出自格林威治时间1970年1月1日凌晨至现在所经过的秒数,并将该值存于tloc所指的单元中.

struct tm *localtime(long *clock)本函数把clock所指的时间(如函数time返回的时间)转换成当地标准时间,并以tm结构形式返回

当秒数大于30,
if (timep->tm_sec>=30)
*(int *)addresstochange=1000;
反之
else
*(int *)addresstochange=2000