aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCChannel.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-11-01 09:29:15 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-11-01 09:29:15 -0700
commitdc4fc1ce38f9060c10ae639173d106c5a7d2bece (patch)
treee763afccfddd9e2f3849b5d44bfbaa8b42c2de64 /src/objective-c/GRPCClient/private/GRPCChannel.m
parentce53ba74746248ef914986bc5fe8a2f89f42ceda (diff)
Use NSEC_PER_SEC
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannel.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannel.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m
index 67a3ac1274..377900fd9e 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.m
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.m
@@ -109,7 +109,7 @@ static GRPCChannelPool *gChannelPool;
if (self->_refCount == 0) {
self->_lastDispatch = [NSDate date];
dispatch_time_t delay =
- dispatch_time(DISPATCH_TIME_NOW, (int64_t)_destroyDelay * 1e9);
+ dispatch_time(DISPATCH_TIME_NOW, (int64_t)self->_destroyDelay * NSEC_PER_SEC);
dispatch_after(delay, self->_timerQueue, ^{
[self timerFire];
});
@@ -132,7 +132,7 @@ static GRPCChannelPool *gChannelPool;
- (void)timerFire {
dispatch_async(_dispatchQueue, ^{
if (self->_disconnected || self->_lastDispatch == nil ||
- -[self->_lastDispatch timeIntervalSinceNow] < -_destroyDelay) {
+ -[self->_lastDispatch timeIntervalSinceNow] < -self->_destroyDelay) {
return;
}
self->_lastDispatch = nil;