Remove duplicated code

Summary: Call Flush() function instead

Test Plan: make all check

Reviewers: igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D38583
main
stash93 10 years ago
parent fb5bdbf987
commit 0c8017dbae
  1. 4
      util/posix_logger.h

@ -146,9 +146,7 @@ class PosixLogger : public Logger {
uint64_t now_micros = static_cast<uint64_t>(now_tv.tv_sec) * 1000000 + uint64_t now_micros = static_cast<uint64_t>(now_tv.tv_sec) * 1000000 +
now_tv.tv_usec; now_tv.tv_usec;
if (now_micros - last_flush_micros_ >= flush_every_seconds_ * 1000000) { if (now_micros - last_flush_micros_ >= flush_every_seconds_ * 1000000) {
flush_pending_ = false; Flush();
fflush(file_);
last_flush_micros_ = now_micros;
} }
if (base != buffer) { if (base != buffer) {
delete[] base; delete[] base;

Loading…
Cancel
Save