From 11c290ba8cbd1dfa3352422160847f8441941924 Mon Sep 17 00:00:00 2001 From: Jeremy Chiang Date: Tue, 10 Mar 2020 14:23:05 -0700 Subject: [PATCH 1/2] Fix network duration unit CACurrentMediaTime already gives us a double in seconds with a lot of precisions. Multiplying it by 1000 is not necessary and is confusing instead. --- Netable/Netable/Netable.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Netable/Netable/Netable.swift b/Netable/Netable/Netable.swift index 8850985..5e472ca 100644 --- a/Netable/Netable/Netable.swift +++ b/Netable/Netable/Netable.swift @@ -67,11 +67,11 @@ open class Netable { } // Send the request - let startTimestamp = CACurrentMediaTime() * 1000 + let startTimestamp = CACurrentMediaTime() let task = urlSession.dataTask(with: urlRequest) { data, response, error in defer { - let endTimestamp = CACurrentMediaTime() * 1000 + let endTimestamp = CACurrentMediaTime() let userInfo = NetableNotification.userInfo( forRequest: urlRequest, From 289dd87514547c8504d723cfa9afb4fb66682b76 Mon Sep 17 00:00:00 2001 From: Jeremy Chiang Date: Tue, 10 Mar 2020 14:25:33 -0700 Subject: [PATCH 2/2] Bump version to 0.8.3 --- CHANGELOG.md | 4 ++++ Netable.podspec | 4 ++-- Netable/Netable.xcodeproj/project.pbxproj | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 535bca2..ca4bf6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.8.3] - 2020-03-10 +### Changed +- Fixed the unit for network duration + ## [0.8.2] - 2020-03-02 ### Added - Added missing error codes diff --git a/Netable.podspec b/Netable.podspec index 2905a68..3b37db0 100644 --- a/Netable.podspec +++ b/Netable.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'Netable' - s.version = '0.8.2' + s.version = '0.8.3' s.summary = 'A simple and swifty networking library.' s.description = 'Netable is a simple Swift framework for working with both simple and non-REST-compliant HTTP endpoints.' s.homepage = 'https://github.com/steamclock/netable/' s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { 'Brendan Lensink' => 'brendan@steamclock.com' } - s.source = { :git => 'https://github.com/steamclock/netable.git', :tag => 'v0.8.2' } + s.source = { :git => 'https://github.com/steamclock/netable.git', :tag => 'v0.8.3' } s.ios.deployment_target = '11.0' s.osx.deployment_target = '10.14' s.source_files = 'Netable/Netable/*.{swift,h,m}' diff --git a/Netable/Netable.xcodeproj/project.pbxproj b/Netable/Netable.xcodeproj/project.pbxproj index 6c15753..317ba2f 100644 --- a/Netable/Netable.xcodeproj/project.pbxproj +++ b/Netable/Netable.xcodeproj/project.pbxproj @@ -586,7 +586,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 0.8.2; + MARKETING_VERSION = 0.8.3; PRODUCT_BUNDLE_IDENTIFIER = com.steamclock.Netable; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -616,7 +616,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 0.8.2; + MARKETING_VERSION = 0.8.3; PRODUCT_BUNDLE_IDENTIFIER = com.steamclock.Netable; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES;