]> git.proxmox.com Git - libgit2.git/blame - include/git2/sys/time.h
New upstream version 0.28.4+dfsg.1
[libgit2.git] / include / git2 / sys / time.h
CommitLineData
2749ff46
VM
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
12GIT_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 */
27GIT_EXTERN(double) git_time_monotonic(void);
28
29GIT_END_DECL
30#endif
31