Android-cuttlefish cvd tool
instance_database_types.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <chrono>
20#include <string>
21
22#include <json/json.h>
23
25
26namespace cuttlefish {
27
28using CvdServerClock = std::chrono::system_clock;
29using TimeStamp = std::chrono::time_point<CvdServerClock>;
30
31Result<TimeStamp> DeserializeTimePoint(const Json::Value& time_point_json);
32std::string Format(const TimeStamp&);
33
34} // namespace cuttlefish
Definition: expected.h:86
Definition: alloc_utils.cpp:23
std::string Format(const TimeStamp &time_point)
Definition: instance_database_types.cpp:42
std::chrono::time_point< CvdServerClock > TimeStamp
Definition: instance_database_types.h:29
std::chrono::system_clock CvdServerClock
Definition: instance_database_types.h:28
Result< TimeStamp > DeserializeTimePoint(const Json::Value &time_point_json)
Definition: instance_database_types.cpp:30