Skip to content

Commit 246fe94

Browse files
committed
Add NSTimeInterval
1 parent 406cc7d commit 246fe94

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

objc2/CHANGELOG_FOUNDATION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1414
* Added `NSMutableDictionary`.
1515
* Added `NSNotFound`.
1616
* Added `NSBundle`.
17+
* Added `NSTimeInterval`.
1718

1819

1920
## objc2 0.3.0-beta.2 - 2022-08-28

objc2/src/foundation/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
#![allow(missing_docs)]
5252
#![allow(clippy::missing_safety_doc)]
5353

54+
use std::os::raw::c_double;
55+
5456
pub use self::array::NSArray;
5557
pub use self::attributed_string::{NSAttributedString, NSAttributedStringKey};
5658
pub use self::bundle::NSBundle;
@@ -91,6 +93,11 @@ pub use crate::ffi::{NSInteger, NSUInteger};
9193
#[allow(non_upper_case_globals)]
9294
pub const NSNotFound: NSInteger = crate::ffi::NSIntegerMax;
9395

96+
/// A number of seconds.
97+
///
98+
/// See [Apple's documentation](https://developer.apple.com/documentation/foundation/nstimeinterval?language=objc).
99+
pub type NSTimeInterval = c_double;
100+
94101
#[cfg(feature = "apple")]
95102
#[link(name = "Foundation", kind = "framework")]
96103
extern "C" {}

0 commit comments

Comments
 (0)