chromium/third_party/fuzztest/src/fuzztest/internal/domains/absl_helpers.h

// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef FUZZTEST_FUZZTEST_INTERNAL_DOMAINS_ABSL_HELPERS_H_
#define FUZZTEST_FUZZTEST_INTERNAL_DOMAINS_ABSL_HELPERS_H_

#include <cstdint>
#include <limits>
#include <utility>

#include "absl/time/time.h"
#include "./fuzztest/internal/logging.h"

namespace fuzztest::internal {

// Note: this implementation is based on knowledge of internal
// representation of absl::Duration and will not cover all
// possible arbitrary durations if the internal representation
// changes.
inline absl::Duration MakeDuration(int64_t secs, uint32_t ticks) {}

// Note: duration `d` needs to be finite.
inline std::pair<int64_t, uint32_t> GetSecondsAndTicks(absl::Duration d) {}

// Note: duration `d` needs to be finite.
inline int64_t GetSeconds(absl::Duration d) {}

// Note: duration `d` needs to be finite.
inline uint32_t GetTicks(absl::Duration d) {}

}  // namespace fuzztest::internal

#endif  // FUZZTEST_FUZZTEST_INTERNAL_DOMAINS_ABSL_HELPERS_H_