博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
arm 测系统时间
阅读量:4124 次
发布时间:2019-05-25

本文共 629 字,大约阅读时间需要 2 分钟。

自己的微妙代码:

struct timezone tz;			struct timeval tv;		    /*获取时间*/			gettimeofday(&tv, &tz);		    printf("now1: %ld %ld\n", tv.tv_sec, tv.tv_usec);			write(uart_fd, send_buf, BUF_MAX);			gettimeofday(&tv, &tz);			printf("now2: %ld %ld\n", tv.tv_sec, tv.tv_usec);
网上能用代码:

/*time_t now; //实例化time_t结构    

struct tm *timenow; //实例化tm结构指针    
time(&now);   
//time函数读取现在的时间(国际标准时间非北京时间),然后传值给now      
timenow = localtime(&now);   
//localtime函数把从time取得的时间now换算成你电脑中的时间(就是你设置的地区)      
printf("Local time is %s\n",asctime(timenow));   
*/
    //getNowTime(nowTime);
  //printf("nowTime1 is %s.wenkewenkewenke\n", nowTime);
//for(i=0;i<14;i++)
// printf("%c", nowTime[i]);

转载地址:http://eklpi.baihongyu.com/

你可能感兴趣的文章
北京十大情人分手圣地
查看>>
Android自动关机代码
查看>>
Android中启动其他Activity并返回结果
查看>>
2009年33所高校被暂停或被限制招生
查看>>
GlassFish 部署及应用入门
查看>>
iWatch报错: Authorization request cancled
查看>>
iWatch报错: Authorizationsession time out
查看>>
如何运行从网上下载的iWatch项目详细步骤.
查看>>
X-code7 beta error: warning: Is a directory
查看>>
Error: An App ID with identifier "*****" is not avaliable. Please enter a different string.
查看>>
X-code beta 开发iWatch项目,运行没有错误,但是某些操作一点就崩,而且找不错误的原因场景一
查看>>
Xcode 报错: Extra argument in call
查看>>
iTunes Connect 上传APP报错: Communication error. please use diagnostic mode to check connectivity.
查看>>
#import <Cocoa/Cocoa.h> 报错 Lexical or Preprocessor Issue 'Cocoa/Cocoa.h' file not found
查看>>
`MQTTClient (~> 0.2.6)` required by `Podfile`
查看>>
X-Code 报错 ld: library not found for -lAFNetworking
查看>>
Bitcode
查看>>
If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
查看>>
3.5 YOLO9000: Better,Faster,Stronger(YOLO9000:更好,更快,更强)
查看>>
iOS菜鸟学习--如何避免两个按钮同时响应
查看>>