void BootEventRecordStore::AddBootEvent(const std::string& name) {
  std::string uptime_str;
  if (!android::base::ReadFileToString("/proc/uptime", &uptime_str)) {
    LOG(ERROR) << "Failed to read /proc/uptime";
  }

  // Cast intentionally rounds down.
  int32_t uptime = static_cast<int32_t>(strtod(uptime_str.c_str(), NULL));
  AddBootEventWithValue(name, uptime);
}
void BootEventRecordStore::AddBootEvent(const std::string& event) {
  AddBootEventWithValue(event, bootstat::ParseUptime());
}