标签:类型 ring code div pre ongl gettime span color
1 +(NSString*)getTimeStamp:(NSDate*)dateNow 2 { 3 4 NSTimeInterval time = [dateNow timeIntervalSince1970]*1000;//NSTimeInterval本身是个秒级别的double类型数值,小数点后面即毫秒数,*1000.0f即可得到毫秒级别的时间差 5 long long dTime = [[NSNumber numberWithDouble:time] longLongValue]; // 将double转为long long型 6 NSString *timeSp = [NSString stringWithFormat:@"%llu",dTime]; // 输出long long型 7 8 return timeSp; 9 }
标签:类型 ring code div pre ongl gettime span color
原文地址:http://www.cnblogs.com/kfgcs/p/6387359.html