[swift-users] CMTimebaseAddTimerDispatchSource and new libdispatch swift 3 version

Vincent Jousse contact at ftsoftware.fr
Sat Dec 10 07:58:12 CST 2016


I’m migrating some code from swift 2 to swift 3, and I use the CoreMedia timebase API (CMSync). One of the functions I use is CMTimebaseAddTimerDispatchSource whose documentation (https://developer.apple.com/reference/coremedia/1489429-cmtimebaseaddtimerdispatchsource <https://developer.apple.com/reference/coremedia/1489429-cmtimebaseaddtimerdispatchsource>) has not been updated and commands to use old swift 2 code (dispatch_source_create( DISPATCH_SOURCE_TYPE_TIMER, 0, 0, some_dispatch_queue )).
Is creating a timer source with DispatchSource.makeTimerSource() and casting it to DispatchSource the right way to go ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20161210/97c60949/attachment.html>

More information about the swift-users mailing list