]>
git.proxmox.com Git - libgit2.git/blob - include/git2/sys/time.h
2 * Copyright (C) the libgit2 contributors. All rights reserved.
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.
7 #ifndef INCLUDE_git_time_h__
8 #define INCLUDE_git_time_h__
10 #include "git2/common.h"
15 * Return a monotonic time value, useful for measuring running time
16 * and setting up timeouts.
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.
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.
25 * This function cannot fail.
27 GIT_EXTERN(double) git_time_monotonic(void);