aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_ats_service.h6
-rw-r--r--src/include/gnunet_client_lib.h2
-rw-r--r--src/include/gnunet_resolver_service.h4
-rw-r--r--src/include/gnunet_scheduler_lib.h4
-rw-r--r--src/include/gnunet_server_lib.h4
-rw-r--r--src/include/gnunet_time_lib.h38
6 files changed, 35 insertions, 23 deletions
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index bc5148de9..9a4bb6d6b 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -133,7 +133,7 @@ enum GNUNET_ATS_Property
133 * Delay 133 * Delay
134 * Time between when the time packet is sent and the packet arrives 134 * Time between when the time packet is sent and the packet arrives
135 * 135 *
136 * Unit: [ms] 136 * Unit: [microseconds]
137 * 137 *
138 * Examples: 138 * Examples:
139 * 139 *
@@ -905,8 +905,8 @@ enum GNUNET_ATS_PreferenceKind
905 * Change the peer's latency value to the given amount. The 905 * Change the peer's latency value to the given amount. The
906 * argument is followed by a double value giving the desired value 906 * argument is followed by a double value giving the desired value
907 * (can be negative). The absolute score in the goal function is 907 * (can be negative). The absolute score in the goal function is
908 * the inverse of the latency in ms (minimum: 1 ms) multiplied by 908 * the inverse of the latency in microseconds (minimum: 1
909 * the latency preferences. 909 * microsecond) multiplied by the latency preferences.
910 */ 910 */
911 GNUNET_ATS_PREFERENCE_LATENCY 911 GNUNET_ATS_PREFERENCE_LATENCY
912}; 912};
diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h
index e402b4295..5bfc4991f 100644
--- a/src/include/gnunet_client_lib.h
+++ b/src/include/gnunet_client_lib.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2013 Christian Grothoff (and other contributing authors) 3 (C) 2001-2013 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
diff --git a/src/include/gnunet_resolver_service.h b/src/include/gnunet_resolver_service.h
index 498400dc3..f7e5c3b72 100644
--- a/src/include/gnunet_resolver_service.h
+++ b/src/include/gnunet_resolver_service.h
@@ -1,10 +1,10 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Christian Grothoff (and other contributing authors) 3 (C) 2001-2013 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h
index 1e2a4000a..c482a000c 100644
--- a/src/include/gnunet_scheduler_lib.h
+++ b/src/include/gnunet_scheduler_lib.h
@@ -1,10 +1,10 @@
1/* 1/*
2 This file is part of GNUnet 2 This file is part of GNUnet
3 (C) 2009, 2011 Christian Grothoff (and other contributing authors) 3 (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h
index 2c64b4698..6ed862fc7 100644
--- a/src/include/gnunet_server_lib.h
+++ b/src/include/gnunet_server_lib.h
@@ -1,10 +1,10 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2009, 2010 Christian Grothoff (and other contributing authors) 3 (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h
index 450417730..298f3284a 100644
--- a/src/include/gnunet_time_lib.h
+++ b/src/include/gnunet_time_lib.h
@@ -1,10 +1,10 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Christian Grothoff (and other contributing authors) 3 (C) 2001-2013 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
@@ -39,18 +39,18 @@ extern "C"
39#include "gnunet_common.h" 39#include "gnunet_common.h"
40 40
41/** 41/**
42 * Time for absolute times used by GNUnet, in milliseconds. 42 * Time for absolute times used by GNUnet, in microseconds.
43 */ 43 */
44struct GNUNET_TIME_Absolute 44struct GNUNET_TIME_Absolute
45{ 45{
46 /** 46 /**
47 * The actual value. 47 * The actual value.
48 */ 48 */
49 uint64_t abs_value; 49 uint64_t abs_value_us;
50}; 50};
51 51
52/** 52/**
53 * Time for relative time used by GNUnet, in milliseconds. 53 * Time for relative time used by GNUnet, in microseconds.
54 * Always positive, so we can only refer to future time. 54 * Always positive, so we can only refer to future time.
55 */ 55 */
56struct GNUNET_TIME_Relative 56struct GNUNET_TIME_Relative
@@ -58,32 +58,32 @@ struct GNUNET_TIME_Relative
58 /** 58 /**
59 * The actual value. 59 * The actual value.
60 */ 60 */
61 uint64_t rel_value; 61 uint64_t rel_value_us;
62}; 62};
63 63
64GNUNET_NETWORK_STRUCT_BEGIN 64GNUNET_NETWORK_STRUCT_BEGIN
65 65
66/** 66/**
67 * Time for relative time used by GNUnet, in milliseconds and in network byte order. 67 * Time for relative time used by GNUnet, in microseconds and in network byte order.
68 */ 68 */
69struct GNUNET_TIME_RelativeNBO 69struct GNUNET_TIME_RelativeNBO
70{ 70{
71 /** 71 /**
72 * The actual value (in network byte order). 72 * The actual value (in network byte order).
73 */ 73 */
74 uint64_t rel_value__ GNUNET_PACKED; 74 uint64_t rel_value_us__ GNUNET_PACKED;
75}; 75};
76 76
77 77
78/** 78/**
79 * Time for absolute time used by GNUnet, in milliseconds and in network byte order. 79 * Time for absolute time used by GNUnet, in microseconds and in network byte order.
80 */ 80 */
81struct GNUNET_TIME_AbsoluteNBO 81struct GNUNET_TIME_AbsoluteNBO
82{ 82{
83 /** 83 /**
84 * The actual value (in network byte order). 84 * The actual value (in network byte order).
85 */ 85 */
86 uint64_t abs_value__ GNUNET_PACKED; 86 uint64_t abs_value_us__ GNUNET_PACKED;
87}; 87};
88GNUNET_NETWORK_STRUCT_END 88GNUNET_NETWORK_STRUCT_END
89 89
@@ -98,9 +98,14 @@ GNUNET_NETWORK_STRUCT_END
98#define GNUNET_TIME_UNIT_ZERO_ABS GNUNET_TIME_absolute_get_zero_() 98#define GNUNET_TIME_UNIT_ZERO_ABS GNUNET_TIME_absolute_get_zero_()
99 99
100/** 100/**
101 * One millisecond, our basic time unit. 101 * One microsecond, our basic time unit.
102 */ 102 */
103#define GNUNET_TIME_UNIT_MILLISECONDS GNUNET_TIME_relative_get_unit_() 103#define GNUNET_TIME_UNIT_MICROSECONDS GNUNET_TIME_relative_get_unit_()
104
105/**
106 * One millisecond.
107 */
108#define GNUNET_TIME_UNIT_MILLISECONDS GNUNET_TIME_relative_get_millisecond_()
104 109
105/** 110/**
106 * One second. 111 * One second.
@@ -181,13 +186,20 @@ GNUNET_TIME_absolute_get_zero_ (void);
181 186
182 187
183/** 188/**
184 * Return relative time of 1ms. 189 * Return relative time of 1 microsecond.
185 */ 190 */
186struct GNUNET_TIME_Relative 191struct GNUNET_TIME_Relative
187GNUNET_TIME_relative_get_unit_ (void); 192GNUNET_TIME_relative_get_unit_ (void);
188 193
189 194
190/** 195/**
196 * Return relative time of 1ms.
197 */
198struct GNUNET_TIME_Relative
199GNUNET_TIME_relative_get_millisecond_ (void);
200
201
202/**
191 * Return relative time of 1s. 203 * Return relative time of 1s.
192 */ 204 */
193struct GNUNET_TIME_Relative 205struct GNUNET_TIME_Relative