Subversion
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
subversion
include
svn_time.h
Go to the documentation of this file.
1
/**
2
* @copyright
3
* ====================================================================
4
* Copyright (c) 2000-2004, 2008 CollabNet. All rights reserved.
5
*
6
* This software is licensed as described in the file COPYING, which
7
* you should have received as part of this distribution. The terms
8
* are also available at http://subversion.tigris.org/license-1.html.
9
* If newer versions of this license are posted there, you may use a
10
* newer version instead, at your option.
11
*
12
* This software consists of voluntary contributions made by many
13
* individuals. For exact contribution history, see the revision
14
* history and logs, available at http://subversion.tigris.org/.
15
* ====================================================================
16
* @endcopyright
17
*
18
* @file svn_time.h
19
* @brief Time/date utilities
20
*/
21
22
#ifndef SVN_TIME_H
23
#define SVN_TIME_H
24
25
#include <apr_pools.h>
26
#include <apr_time.h>
27
28
#include "
svn_error.h
"
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
/* __cplusplus */
33
34
35
/** Convert @a when to a <tt>const char *</tt> representation allocated
36
* in @a pool. Use svn_time_from_cstring() for the reverse
37
* conversion.
38
*/
39
const
char
*
40
svn_time_to_cstring
(apr_time_t when,
41
apr_pool_t *pool);
42
43
/** Convert @a data to an @c apr_time_t @a when.
44
* Use @a pool for temporary memory allocation.
45
*/
46
svn_error_t
*
47
svn_time_from_cstring
(apr_time_t *when,
48
const
char
*data,
49
apr_pool_t *pool);
50
51
/** Convert @a when to a <tt>const char *</tt> representation allocated
52
* in @a pool, suitable for human display in UTF8.
53
*/
54
const
char
*
55
svn_time_to_human_cstring
(apr_time_t when,
56
apr_pool_t *pool);
57
58
59
/** Convert a human-readable date @a text into an @c apr_time_t, using
60
* @a now as the current time and storing the result in @a result.
61
* The local time zone will be used to compute the appropriate GMT
62
* offset if @a text contains a local time specification. Set @a
63
* matched to indicate whether or not @a text was parsed successfully.
64
* Perform any allocation in @a pool. Return an error iff an internal
65
* error (rather than a simple parse error) occurs.
66
*/
67
svn_error_t
*
68
svn_parse_date
(
svn_boolean_t
*matched,
69
apr_time_t *result,
70
const
char
*text,
71
apr_time_t now,
72
apr_pool_t *pool);
73
74
75
/** Sleep until the next second, to ensure that any files modified
76
* after we exit have a different timestamp than the one we recorded.
77
*
78
* @deprecated Provided for backward compatibility with the 1.5 API.
79
* Use svn_io_sleep_for_timestamps() instead.
80
*/
81
SVN_DEPRECATED
82
void
83
svn_sleep_for_timestamps
(
void
);
84
85
#ifdef __cplusplus
86
}
87
#endif
/* __cplusplus */
88
89
#endif
/* SVN_TIME_H */
Generated on Fri Aug 11 2017 08:46:40 for Subversion by
1.8.1.2