Fix error and add note about lossy issues

This commit is contained in:
Thomas Van Lenten 2016-09-08 15:34:42 -04:00
parent 4bc1657853
commit 161b937740

View File

@ -54,7 +54,12 @@ NS_ASSUME_NONNULL_BEGIN
/** The NSDate representation of this GPBTimestamp. */ /** The NSDate representation of this GPBTimestamp. */
@property(nonatomic, readwrite, strong) NSDate *date; @property(nonatomic, readwrite, strong) NSDate *date;
/** The NSTimeInterval representation of this GPBTimestamp. */ /**
* The NSTimeInterval representation of this GPBTimestamp.
*
* @note: Not all second/nanos combinations can be represented in a
* NSTimeInterval, so getting this could be a lossy transform.
**/
@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970; @property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970;
/** /**
@ -82,7 +87,12 @@ NS_ASSUME_NONNULL_BEGIN
**/ **/
@interface GPBDuration (GBPWellKnownTypes) @interface GPBDuration (GBPWellKnownTypes)
/** The NSTimeInterval representation of this GPBTimestamp. */ /**
* The NSTimeInterval representation of this GPBDuration.
*
* @note: Not all second/nanos combinations can be represented in a
* NSTimeInterval, so getting this could be a lossy transform.
**/
@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970; @property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970;
/** /**
@ -90,7 +100,7 @@ NS_ASSUME_NONNULL_BEGIN
* *
* @param timeIntervalSince1970 Time interval to configure the GPBDuration with. * @param timeIntervalSince1970 Time interval to configure the GPBDuration with.
* *
* @return A newly initialized GPBTimestamp. * @return A newly initialized GPBDuration.
**/ **/
- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970; - (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970;