Implemented the "asString" computed property for the TimeInterval+Computed extension in the library target.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
//===----------------------------------------------------------------------===
|
||||
//
|
||||
// This source file is part of the MarvelService open source project
|
||||
//
|
||||
// Copyright (c) -2025 Röck+Cöde VoF. and the MarvelService project authors
|
||||
// Licensed under the EUPL 1.2 or later.
|
||||
//
|
||||
// See LICENSE for license information
|
||||
// See CONTRIBUTORS for the list of MarvelService project authors
|
||||
//
|
||||
//===----------------------------------------------------------------------===
|
||||
|
||||
import struct Foundation.TimeInterval
|
||||
|
||||
extension TimeInterval {
|
||||
|
||||
// MARK: Functions
|
||||
|
||||
/// Converts a time interval to a string value.
|
||||
/// - Returns: A time interval as a string.
|
||||
var asString: String {
|
||||
.init(format: "%f", self)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user