Ziti C SDK
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1// Copyright (c) 2022. NetFoundry Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15
16#ifndef ZITI_SDK_TYPES_H
17#define ZITI_SDK_TYPES_H
18
19#include <stddef.h>
20#include <stdint.h>
21
22#include "externs.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
29typedef int64_t duration;
30
31#define DURATION_MILLISECONDS(d) ((d)/MILLISECOND)
32
33#define MICROSECOND ((int64_t)1000)
34#define MILLISECOND (1000 * MICROSECOND)
35#define SECOND (1000 * MILLISECOND)
36#define MINUTE (60 * SECOND)
37#define HOUR (60 * MINUTE)
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif //ZITI_SDK_TYPES_H
int64_t duration
Nanosecond precision time duration, like Golang's time.Duration.
Definition types.h:29