2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Use crl::time/now instead of TimeMs/getms.

This commit is contained in:
John Preston
2019-02-19 10:57:53 +04:00
parent d208236994
commit fe618bd652
310 changed files with 1133 additions and 1141 deletions

View File

@@ -295,8 +295,8 @@ void Call::setMute(bool mute) {
_muteChanged.notify(_mute);
}
TimeMs Call::getDurationMs() const {
return _startTime ? (getms(true) - _startTime) : 0;
crl::time Call::getDurationMs() const {
return _startTime ? (crl::now() - _startTime) : 0;
}
void Call::hangup() {
@@ -341,7 +341,7 @@ void Call::startWaitingTrack() {
float64 Call::getWaitingSoundPeakValue() const {
if (_waitingTrack) {
auto when = getms() + kSoundSampleMs / 4;
auto when = crl::now() + kSoundSampleMs / 4;
return _waitingTrack->getPeakValue(when);
}
return 0.;
@@ -740,7 +740,7 @@ void Call::setState(State state) {
}
switch (_state) {
case State::Established:
_startTime = getms(true);
_startTime = crl::now();
break;
case State::ExchangingKeys:
_delegate->playSound(Delegate::Sound::Connecting);