3 * Copyright 2016 gRPC authors.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 #ifndef GRPC_IMPL_CODEGEN_GPR_TYPES_H
20 #define GRPC_IMPL_CODEGEN_GPR_TYPES_H
22 #include <grpc/impl/codegen/port_platform.h>
30 /** The clocks we support. */
32 /** Monotonic clock. Epoch undefined. Always moves forwards. */
33 GPR_CLOCK_MONOTONIC = 0,
34 /** Realtime clock. May jump forwards or backwards. Settable by
35 the system administrator. Has its epoch at 0:00:00 UTC 1 Jan 1970. */
37 /** CPU cycle time obtained by rdtsc instruction on x86 platforms. Epoch
38 undefined. Degrades to GPR_CLOCK_REALTIME on other platforms. */
40 /** Unmeasurable clock type: no base, created by taking the difference
45 /** Analogous to struct timespec. On some machines, absolute times may be in
47 typedef struct gpr_timespec {
50 /** Against which clock was this time measured? (or GPR_TIMESPAN if
51 this is a relative time measure) */
52 gpr_clock_type clock_type;
59 #endif /* GRPC_IMPL_CODEGEN_GPR_TYPES_H */