1 Reply
      Latest reply on Sep 21, 2018 12:15 PM by remsleep
      remsleep Level 1 Level 1 (0 points)

        I can't find the iOS equivalent of mach_absolute_time that will give me the current time in microseconds -- is there no such thing?

        • Re: want iOS current time in microseconds
          remsleep Level 1 Level 1 (0 points)

          Thanx - it turns out I was failing to recognize that a Foundation TimeInterval is a Double. When I posted, I was thinking it was an Int with resolution only to seconds. Since it's a Double, I can multiply by 10**6 and get microseconds. I can just use the regular Foundation Date for this.


               let time0 = Int(Date().timeIntervalSince1970 * 1_000_000) & 0xffff_ffff

               appSeed0 = time0