IOS 毫秒级的计算 毫秒时间

{app.params.name}} {app.params.name}} {app.params.name}}

毫秒级很简单

看代码示例

_imageNameDic = [NSMutableDictionary dictionaryWithCapacity:IMAGE_SUM];
for(int i=0;i<IMAGE_SUM;i++){
    NSDate *date = [NSDate date];
    NSTimeInterval aInterval =[date timeIntervalSince1970];
    
    NSString *timeString = [NSString stringWithFormat:@"%f", aInterval];

    NSString *uuid = [postData uuid];
    NSString *filename = [NSString stringWithFormat:@"%@_%@.png",uuid,timeString];
    NSMutableDictionary *tmpDic = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"",@"state",[NSString stringWithFormat:@"%@",filename],@"name", nil];
    [_imageNameDic setObject:tmpDic
                      forKey:[NSString stringWithFormat:@"%d",i]];
}


版权声明

davidzhang 创作并维护的 Gowhich 博客采用 创作共用保留署名-非商业-禁止演绎4.0国际许可证。

本文首发于 Gowhich 博客( https://www.gowhich.com ),版权所有,侵权必究。

本文永久链接: https://www.gowhich.com/blog/238

comments powered by Disqus