mirror of
https://github.com/bitgapp/eqMac.git
synced 2024-11-23 06:42:02 +03:00
moved to UInts on some timing logic
This commit is contained in:
parent
0a761c26cc
commit
9bb9f0c312
@ -38,10 +38,10 @@ struct Constants {
|
||||
static let FULL_VOLUME_STEPS: [Double] = Array(stride(from: 0.0, through: 2.0, by: FULL_VOLUME_STEP))
|
||||
static let QUARTER_VOLUME_STEPS: [Double] = Array(stride(from: 0.0, through: 2.0, by: QUARTER_VOLUME_STEP))
|
||||
|
||||
static let TRANSITION_DURATION: Int = 500
|
||||
static let TRANSITION_DURATION: UInt = 500
|
||||
static let TRANSITION_FPS: Double = 30
|
||||
static let TRANSITION_FRAME_DURATION: Double = 1000 / TRANSITION_FPS
|
||||
static let TRANSITION_FRAME_COUNT = Int(round(TRANSITION_FPS * (Double(TRANSITION_DURATION) / 1000)))
|
||||
static let TRANSITION_FRAME_COUNT = UInt(round(TRANSITION_FPS * (Double(TRANSITION_DURATION) / 1000)))
|
||||
static let SUPPORTED_TRANSPORT_TYPES = [
|
||||
TransportType.airPlay,
|
||||
TransportType.bluetooth,
|
||||
|
@ -10,9 +10,9 @@ import Foundation
|
||||
|
||||
|
||||
class Time {
|
||||
static var stamp: Int {
|
||||
static var stamp: UInt {
|
||||
get {
|
||||
return Int(NSDate().timeIntervalSince1970 * 1000)
|
||||
return UInt(NSDate().timeIntervalSince1970 * 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ class Utilities {
|
||||
return Bundle.main.infoDictionary![key] as! String
|
||||
}
|
||||
|
||||
static func delay (_ milliseconds: Int, completion: @escaping () -> ()) {
|
||||
static func delay (_ milliseconds: UInt, completion: @escaping () -> ()) {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + Double(milliseconds) / 1000) { completion() }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user