am d9bb6770: Merge "logd: 64-bit compile issue"
* commit 'd9bb677036f875e91d6bfd295226c0a65b24c056': logd: 64-bit compile issue
This commit is contained in:
commit
15704b1bdf
|
@ -33,6 +33,9 @@ public:
|
|||
uint32_t tv_sec; // good to Feb 5 2106
|
||||
uint32_t tv_nsec;
|
||||
|
||||
static const uint32_t tv_sec_max = 0xFFFFFFFFUL;
|
||||
static const uint32_t tv_nsec_max = 999999999UL;
|
||||
|
||||
log_time(const timespec &T)
|
||||
{
|
||||
tv_sec = T.tv_sec;
|
||||
|
|
|
@ -392,8 +392,8 @@ LogStatistics::LogStatistics()
|
|||
|
||||
dgram_qlen_statistics = false;
|
||||
for(unsigned short bucket = 0; dgram_qlen(bucket); ++bucket) {
|
||||
mMinimum[bucket].tv_sec = (uint32_t)-1;
|
||||
mMinimum[bucket].tv_nsec = 999999999UL;
|
||||
mMinimum[bucket].tv_sec = mMinimum[bucket].tv_sec_max;
|
||||
mMinimum[bucket].tv_nsec = mMinimum[bucket].tv_nsec_max;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -439,7 +439,7 @@ unsigned short LogStatistics::dgram_qlen(unsigned short bucket) {
|
|||
}
|
||||
|
||||
unsigned long long LogStatistics::minimum(unsigned short bucket) {
|
||||
if (mMinimum[bucket].tv_sec == LONG_MAX) {
|
||||
if (mMinimum[bucket].tv_sec == mMinimum[bucket].tv_sec_max) {
|
||||
return 0;
|
||||
}
|
||||
return mMinimum[bucket].nsec();
|
||||
|
|
Loading…
Reference in New Issue