Skip to content

Commit ac9537d

Browse files
[Matter.framework] Follow-up to address remaining issues from #36015 (#36064)
* [Matter.framework] Follow-up to address remaining issues from #36015 * Update src/darwin/Framework/CHIP/MTRBaseDevice.mm Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> --------- Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
1 parent d9a995f commit ac9537d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/darwin/Framework/CHIP/MTRBaseDevice.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1894,7 +1894,7 @@ NSTimeInterval MTRTimeIntervalForEventTimestampValue(uint64_t timeValue)
18941894
uint64_t eventTimestampValueSeconds = timeValue / chip::kMillisecondsPerSecond;
18951895
uint64_t eventTimestampValueRemainderMilliseconds = timeValue % chip::kMillisecondsPerSecond;
18961896
NSTimeInterval eventTimestampValueRemainder
1897-
= NSTimeInterval(eventTimestampValueRemainderMilliseconds / static_cast<uint64_t>(chip::kMillisecondsPerSecond));
1897+
= NSTimeInterval(eventTimestampValueRemainderMilliseconds) / static_cast<double>(chip::kMillisecondsPerSecond);
18981898
NSTimeInterval eventTimestampValue = eventTimestampValueSeconds + eventTimestampValueRemainder;
18991899

19001900
return eventTimestampValue;

src/darwin/Framework/CHIP/MTRConversion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ AsNumber(chip::Optional<T> optional)
3838

3939
inline NSDate * MatterEpochSecondsAsDate(uint32_t matterEpochSeconds)
4040
{
41-
const uint64_t interval = static_cast<uint32_t>(chip::kChipEpochSecondsSinceUnixEpoch) + matterEpochSeconds;
41+
const auto interval = static_cast<uint64_t>(chip::kChipEpochSecondsSinceUnixEpoch) + static_cast<uint64_t>(matterEpochSeconds);
4242
return [NSDate dateWithTimeIntervalSince1970:(NSTimeInterval) interval];
4343
}
4444

0 commit comments

Comments
 (0)