]> git.proxmox.com Git - libgit2.git/blob - include/git2/sys/time.h
time: Export `git_time_monotonic`
[libgit2.git] / include / git2 / sys / time.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7 #ifndef INCLUDE_git_time_h__
8 #define INCLUDE_git_time_h__
9
10 #include "git2/common.h"
11
12 GIT_BEGIN_DECL
13
14 /**
15 * Return a monotonic time value, useful for measuring running time
16 * and setting up timeouts.
17 *
18 * The returned value is an arbitrary point in time -- it can only be
19 * used when comparing it to another `git_time_monotonic` call.
20 *
21 * The time is returned in seconds, with a decimal fraction that differs
22 * on accuracy based on the underlying system, but should be least
23 * accurate to Nanoseconds.
24 *
25 * This function cannot fail.
26 */
27 GIT_EXTERN(double) git_time_monotonic(void);
28
29 GIT_END_DECL
30 #endif
31