时间差在控制台输出中是一个不可读的大数字
iOS 上的新东西,这个 NSDate 快要死了。 我只是想抓住时间差..所以我做了什么
NSDate *start=[NSDate date];
NSLog(@"Start date %d", start);
//---- some for loop jobs here ----
NSDate *end=[NSDate date];
NSLog(@"End date %d", end);
double timedifference= [end timeIntervalSinceDate:start];
NSLog(@"response time %d", timedifference);
以及我在控制台中得到的结果..
2011-08-27 12:27:51.505 TabNav[8153:e903] Start date 172118224
2011-08-27 12:27:53.304 TabNav[8153:e903] End date 92503392
2011-08-27 12:27:53.304 TabNav[8153:e903] response time 1073741824
如何将响应时间 1073741824 转换为秒?
谢谢
Kind of new on iOS and this NSDate is killing me..
I just want to grab the time difference.. so what I did
NSDate *start=[NSDate date];
NSLog(@"Start date %d", start);
//---- some for loop jobs here ----
NSDate *end=[NSDate date];
NSLog(@"End date %d", end);
double timedifference= [end timeIntervalSinceDate:start];
NSLog(@"response time %d", timedifference);
And the result I got in the console..
2011-08-27 12:27:51.505 TabNav[8153:e903] Start date 172118224
2011-08-27 12:27:53.304 TabNav[8153:e903] End date 92503392
2011-08-27 12:27:53.304 TabNav[8153:e903] response time 1073741824
How can I convert response time 1073741824 to second ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这只是格式问题:
I think it is just a matter of formatting: