Fix TimeCallback used by BoringSSL.

Wasn't setting microseconds properly in timeval structure.

TBR=pthatcher@webrtc.org
BUG=webrtc:6737

Review-Url: https://codereview.webrtc.org/2523533003
Cr-Commit-Position: refs/heads/master@{#15174}
This commit is contained in:
deadbeef 2016-11-21 14:33:57 -08:00 committed by Commit bot
parent 1b0e3aa440
commit 7a07f133c4

View File

@ -66,7 +66,7 @@ static SrtpCipherMapEntry SrtpCipherMap[] = {
static void TimeCallback(const SSL* ssl, struct timeval* out_clock) {
uint64_t time = TimeNanos();
out_clock->tv_sec = time / kNumNanosecsPerSec;
out_clock->tv_usec = time / kNumNanosecsPerMicrosec;
out_clock->tv_usec = (time % kNumNanosecsPerSec) / kNumNanosecsPerMicrosec;
}
#else // #ifdef OPENSSL_IS_BORINGSSL