File tree 2 files changed +2
-2
lines changed
src/darwin/Framework/CHIP
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1894,7 +1894,7 @@ NSTimeInterval MTRTimeIntervalForEventTimestampValue(uint64_t timeValue)
1894
1894
uint64_t eventTimestampValueSeconds = timeValue / chip::kMillisecondsPerSecond ;
1895
1895
uint64_t eventTimestampValueRemainderMilliseconds = timeValue % chip::kMillisecondsPerSecond ;
1896
1896
NSTimeInterval eventTimestampValueRemainder
1897
- = NSTimeInterval (eventTimestampValueRemainderMilliseconds / static_cast <uint64_t >(chip::kMillisecondsPerSecond ) );
1897
+ = NSTimeInterval (eventTimestampValueRemainderMilliseconds) / static_cast <double >(chip::kMillisecondsPerSecond );
1898
1898
NSTimeInterval eventTimestampValue = eventTimestampValueSeconds + eventTimestampValueRemainder;
1899
1899
1900
1900
return eventTimestampValue;
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ AsNumber(chip::Optional<T> optional)
38
38
39
39
inline NSDate * MatterEpochSecondsAsDate (uint32_t matterEpochSeconds)
40
40
{
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) ;
42
42
return [NSDate dateWithTimeIntervalSince1970: (NSTimeInterval ) interval];
43
43
}
44
44
You can’t perform that action at this time.
0 commit comments