Skip to content

Commit

Permalink
[Matter.framework] Follow-up to address remaining issues from project…
Browse files Browse the repository at this point in the history
…-chip#36015 (project-chip#36064)

* [Matter.framework] Follow-up to address remaining issues from project-chip#36015

* Update src/darwin/Framework/CHIP/MTRBaseDevice.mm

Co-authored-by: Boris Zbarsky <[email protected]>

---------

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
vivien-apple and bzbarsky-apple authored Oct 14, 2024
1 parent d9a995f commit ac9537d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRBaseDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ NSTimeInterval MTRTimeIntervalForEventTimestampValue(uint64_t timeValue)
uint64_t eventTimestampValueSeconds = timeValue / chip::kMillisecondsPerSecond;
uint64_t eventTimestampValueRemainderMilliseconds = timeValue % chip::kMillisecondsPerSecond;
NSTimeInterval eventTimestampValueRemainder
= NSTimeInterval(eventTimestampValueRemainderMilliseconds / static_cast<uint64_t>(chip::kMillisecondsPerSecond));
= NSTimeInterval(eventTimestampValueRemainderMilliseconds) / static_cast<double>(chip::kMillisecondsPerSecond);
NSTimeInterval eventTimestampValue = eventTimestampValueSeconds + eventTimestampValueRemainder;

return eventTimestampValue;
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ AsNumber(chip::Optional<T> optional)

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

Expand Down

0 comments on commit ac9537d

Please sign in to comment.