[ Merge of http://go/wvgerrit/85503 ] Replacing a few instances of C's NULL with C++'s nullptr in some of the smaller sub-directories in the CDM. Note that clang-format has performed additional changes to some of the test files that have not yet been formatted. Bug: 120602075 Test: Android unittest Change-Id: I926135ed4b85e9d2d58a014b4a62098b0cb7a373
21 lines
460 B
C++
21 lines
460 B
C++
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine Master
|
|
// License Agreement.
|
|
//
|
|
// Clock - implemented using the standard linux time library
|
|
|
|
#include "clock.h"
|
|
|
|
#include <sys/time.h>
|
|
|
|
namespace wvcdm {
|
|
|
|
int64_t Clock::GetCurrentTime() {
|
|
struct timeval tv;
|
|
tv.tv_sec = tv.tv_usec = 0;
|
|
gettimeofday(&tv, nullptr);
|
|
return tv.tv_sec;
|
|
}
|
|
|
|
} // namespace wvcdm
|