session-ios/SessionUtilitiesKit/General/TimestampUtils.swift
2021-11-25 16:50:30 +11:00

9 lines
219 B
Swift

public final class TimestampUtils {
public static func isWithinOneMinute(timestamp: UInt64) -> Bool {
Date().timeIntervalSince(NSDate.ows_date(withMillisecondsSince1970: timestamp)) <= 60
}
}