diff options
Diffstat (limited to 'absl')
-rw-r--r-- | absl/synchronization/internal/mutex_nonprod.cc | 4 | ||||
-rw-r--r-- | absl/time/time.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/absl/synchronization/internal/mutex_nonprod.cc b/absl/synchronization/internal/mutex_nonprod.cc index 4590b98dbbed..1732f8365005 100644 --- a/absl/synchronization/internal/mutex_nonprod.cc +++ b/absl/synchronization/internal/mutex_nonprod.cc @@ -32,6 +32,10 @@ namespace absl { ABSL_NAMESPACE_BEGIN + +void SetMutexDeadlockDetectionMode(OnDeadlockCycle) {} +void EnableMutexInvariantDebugging(bool) {} + namespace synchronization_internal { namespace { diff --git a/absl/time/time.h b/absl/time/time.h index 33a4a630c296..152f3ff865ed 100644 --- a/absl/time/time.h +++ b/absl/time/time.h @@ -1348,8 +1348,8 @@ constexpr Duration MakeDuration(int64_t hi, int64_t lo) { // it's positive and can be converted to int64_t without risk of UB. inline Duration MakePosDoubleDuration(double n) { const int64_t int_secs = static_cast<int64_t>(n); - const uint32_t ticks = - static_cast<uint32_t>((n - int_secs) * kTicksPerSecond + 0.5); + const uint32_t ticks = static_cast<uint32_t>( + (n - static_cast<double>(int_secs)) * kTicksPerSecond + 0.5); return ticks < kTicksPerSecond ? MakeDuration(int_secs, ticks) : MakeDuration(int_secs + 1, ticks - kTicksPerSecond); |