//
//  NSObject+GMDate.h
//  Gengmei
//
//  Created by lizhen on 2019/2/15.
//  Copyright © 2019 更美互动信息科技有限公司. All rights reserved.
//

#include <mach/mach_time.h>
@interface NSObject (GMDate)

/** NSDate->时间戳 */
- (CGFloat)getDateTime:(NSDate *)Date;

/** NSDate->时间字符串 */
- (NSString *)getDateToString:(NSDate *)Date;

/** 时间戳->字符串 */
- (NSString *)getDateStringWithTimeStr:(float)time;

/** 字符串时间—>时间戳 */
- (CGFloat)timeStringToTimeFloat:(NSString *)time;

/** 计算两个 NSDate 相差天数 */
- (NSString *)getTimeFrom:(NSDate *)fromDate to:(NSDate *)toDate;

/** 字符串->日期 */
- (NSDate *)getDateWithString:(NSString *)str;

/** 时间戳->NSDate */
- (NSDate *)getDateWithFloat:(float)time;

uint64_t GetPIDTimeInNanoseconds(uint64_t start,uint64_t end);
@end
