]> git.meshlink.io Git - catta/blob - avahi-compat-howl/include/salt/time.h
fix avahi_netlink_new to allow multiple netlinks per process
[catta] / avahi-compat-howl / include / salt / time.h
1 #ifndef _salt_time_h
2 #define _salt_time_h
3
4 /*
5  * Copyright 2003, 2004 Porchdog Software. All rights reserved.
6  *
7  *      Redistribution and use in source and binary forms, with or without modification,
8  *      are permitted provided that the following conditions are met:
9  *
10  *              1. Redistributions of source code must retain the above copyright notice,
11  *                 this list of conditions and the following disclaimer.
12  *              2. Redistributions in binary form must reproduce the above copyright notice,
13  *                 this list of conditions and the following disclaimer in the documentation
14  *                 and/or other materials provided with the distribution.
15  *
16  *      THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
17  *      EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  *      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19  *      IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
20  *      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21  *      BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  *      DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23  *      OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24  *      OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25  *      OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  *      The views and conclusions contained in the software and documentation are those
28  *      of the authors and should not be interpreted as representing official policies,
29  *      either expressed or implied, of Porchdog Software.
30  */
31
32 #include <salt/platform.h>
33
34
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39
40
41 struct                                                          _sw_timer;
42 typedef struct _sw_timer        *       sw_timer;
43
44
45 sw_result HOWL_API
46 sw_timer_init(
47                 sw_timer        *       self);
48
49
50 sw_result HOWL_API
51 sw_timer_fina(
52                 sw_timer        self);
53
54
55 typedef struct _sw_time
56 {
57         sw_uint32       m_secs;
58         sw_uint32 m_usecs;
59 } sw_time;
60
61
62 sw_result HOWL_API
63 sw_time_init(
64                 sw_time *       self);
65
66
67 sw_result HOWL_API
68 sw_time_init_now(
69                 sw_time *       self);
70
71
72 sw_result HOWL_API
73 sw_time_fina(
74                 sw_time self);
75
76
77 sw_time HOWL_API
78 sw_time_add(
79                 sw_time self,
80                 sw_time y);
81
82
83 sw_time HOWL_API
84 sw_time_sub(
85                 sw_time self,
86                 sw_time y);
87
88
89 sw_int32 HOWL_API
90 sw_time_cmp(
91                 sw_time self,
92                 sw_time y);
93
94
95 #ifdef __cplusplus
96 }
97 #endif
98
99
100 #endif