Hello,

I am trying to define an operator that subtracts dispatch times:

#import Dispatch

func -( time1: DispatchTime, time2: DispatchTime ) -> DispatchTimeInterval
        {
        return DispatchTimeInterval.nanoseconds( time2.uptimeNanoseconds - 
time1.uptimeNanoseconds )
        }

Compiler says: Ambiguous use of operator ‘-'
Found this candidate
Found this candidate

As usual the candidates are unknown.

What am I doing wrong?

Jan E.
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to