aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-11 21:21:56 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-11 21:21:56 +0000
commit3d7fefedc9ba60bd8e8448efe8b628446d958536 (patch)
tree61ce41a52cd6e7232cead77818ef265993b2427e /src/fs/fs_api.c
parent4a0398474db197abed243a123fb971fbeeffab4b (diff)
downloadgnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.tar.gz
gnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.zip
changing time measurement from milliseconds to microseconds
Diffstat (limited to 'src/fs/fs_api.c')
-rw-r--r--src/fs/fs_api.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index 9676f2e3c..91c568554 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -164,7 +164,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
164 run_time = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 2); 164 run_time = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 2);
165 end_time = GNUNET_TIME_absolute_add (qe->start_time, run_time); 165 end_time = GNUNET_TIME_absolute_add (qe->start_time, run_time);
166 rst = GNUNET_TIME_absolute_get_remaining (end_time); 166 rst = GNUNET_TIME_absolute_get_remaining (end_time);
167 if (0 == rst.rel_value) 167 if (0 == rst.rel_value_us)
168 { 168 {
169 num_probes_expired++; 169 num_probes_expired++;
170 stop_job (qe); 170 stop_job (qe);
@@ -181,7 +181,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
181 qe->blocks * qe->start_times); 181 qe->blocks * qe->start_times);
182 end_time = GNUNET_TIME_absolute_add (qe->start_time, run_time); 182 end_time = GNUNET_TIME_absolute_add (qe->start_time, run_time);
183 rst = GNUNET_TIME_absolute_get_remaining (end_time); 183 rst = GNUNET_TIME_absolute_get_remaining (end_time);
184 if (0 == rst.rel_value) 184 if (0 == rst.rel_value_us)
185 { 185 {
186 num_downloads_expired++; 186 num_downloads_expired++;
187 stop_job (qe); 187 stop_job (qe);
@@ -781,7 +781,7 @@ write_start_time (struct GNUNET_BIO_WriteHandle *wh,
781 struct GNUNET_TIME_Relative dur; 781 struct GNUNET_TIME_Relative dur;
782 782
783 dur = GNUNET_TIME_absolute_get_duration (timestamp); 783 dur = GNUNET_TIME_absolute_get_duration (timestamp);
784 return GNUNET_BIO_write_int64 (wh, dur.rel_value); 784 return GNUNET_BIO_write_int64 (wh, dur.rel_value_us);
785} 785}
786 786
787 787
@@ -805,7 +805,7 @@ read_start_time (struct GNUNET_BIO_ReadHandle *rh,
805{ 805{
806 struct GNUNET_TIME_Relative dur; 806 struct GNUNET_TIME_Relative dur;
807 807
808 if (GNUNET_OK != GNUNET_BIO_read_int64 (rh, &dur.rel_value)) 808 if (GNUNET_OK != GNUNET_BIO_read_int64 (rh, &dur.rel_value_us))
809 return GNUNET_SYSERR; 809 return GNUNET_SYSERR;
810 *timestamp = GNUNET_TIME_absolute_subtract (GNUNET_TIME_absolute_get (), dur); 810 *timestamp = GNUNET_TIME_absolute_subtract (GNUNET_TIME_absolute_get (), dur);
811 return GNUNET_OK; 811 return GNUNET_OK;
@@ -871,7 +871,7 @@ deserialize_fi_node (struct GNUNET_FS_Handle *h, const char *fn,
871 || (GNUNET_OK != 871 || (GNUNET_OK !=
872 GNUNET_BIO_read_string (rh, "fn", &ret->filename, 16 * 1024)) || 872 GNUNET_BIO_read_string (rh, "fn", &ret->filename, 16 * 1024)) ||
873 (GNUNET_OK != 873 (GNUNET_OK !=
874 GNUNET_BIO_read_int64 (rh, &ret->bo.expiration_time.abs_value)) || 874 GNUNET_BIO_read_int64 (rh, &ret->bo.expiration_time.abs_value_us)) ||
875 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &ret->bo.anonymity_level)) || 875 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &ret->bo.anonymity_level)) ||
876 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &ret->bo.content_priority)) || 876 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &ret->bo.content_priority)) ||
877 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &ret->bo.replication_level))) 877 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &ret->bo.replication_level)))
@@ -1273,7 +1273,7 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
1273 (GNUNET_OK != GNUNET_BIO_write_string (wh, fi->emsg)) || 1273 (GNUNET_OK != GNUNET_BIO_write_string (wh, fi->emsg)) ||
1274 (GNUNET_OK != GNUNET_BIO_write_string (wh, fi->filename)) || 1274 (GNUNET_OK != GNUNET_BIO_write_string (wh, fi->filename)) ||
1275 (GNUNET_OK != 1275 (GNUNET_OK !=
1276 GNUNET_BIO_write_int64 (wh, fi->bo.expiration_time.abs_value)) || 1276 GNUNET_BIO_write_int64 (wh, fi->bo.expiration_time.abs_value_us)) ||
1277 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->bo.anonymity_level)) || 1277 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->bo.anonymity_level)) ||
1278 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->bo.content_priority)) || 1278 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->bo.content_priority)) ||
1279 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->bo.replication_level))) 1279 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->bo.replication_level)))