Add a custom case to the TimeEventFrequency enum.

Will fix #52.
This commit is contained in:
Jørgen Henrichsen
2019-04-18 16:53:07 +02:00
parent d32a041159
commit 08ebb473f2
@@ -13,12 +13,14 @@ public enum TimeEventFrequency {
case everySecond
case everyHalfSecond
case everyQuarterSecond
case custom(time: CMTime)
func getTime() -> CMTime {
switch self {
case .everySecond: return CMTime(value: 1, timescale: 1)
case .everyHalfSecond: return CMTime(value: 1, timescale: 2)
case .everyQuarterSecond: return CMTime(value: 1, timescale: 4)
case .custom(let time): return time
}
}
}