diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-27 09:21:14 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-27 09:21:14 +0000 |
commit | 71f77f1be3d6e2da1b88fe4a4fdd44c3c69b5325 (patch) | |
tree | 5570130fdab90ad02f4b5bfda414d13161f0f3d1 /src/util/test_crypto_rsa.c | |
parent | 1d7368a52af332af35ec6de22affef4f5f0c1da4 (diff) | |
download | gnunet-71f77f1be3d6e2da1b88fe4a4fdd44c3c69b5325.tar.gz gnunet-71f77f1be3d6e2da1b88fe4a4fdd44c3c69b5325.zip |
Changed GNUNET_TIME_Absolute and GNUNET_TIME_Relative to allow safe comparisons between time values
Diffstat (limited to 'src/util/test_crypto_rsa.c')
-rw-r--r-- | src/util/test_crypto_rsa.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/test_crypto_rsa.c b/src/util/test_crypto_rsa.c index ca3f69c35..cacaa78e9 100644 --- a/src/util/test_crypto_rsa.c +++ b/src/util/test_crypto_rsa.c | |||
@@ -84,7 +84,7 @@ testEncryptDecrypt () | |||
84 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", | 84 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", |
85 | ITER, | 85 | ITER, |
86 | (unsigned long long) | 86 | (unsigned long long) |
87 | GNUNET_TIME_absolute_get_duration (start).value, ok); | 87 | GNUNET_TIME_absolute_get_duration (start).rel_value, ok); |
88 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 88 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
89 | if (ok == 0) | 89 | if (ok == 0) |
90 | return GNUNET_OK; | 90 | return GNUNET_OK; |
@@ -124,7 +124,7 @@ testEncryptPerformance () | |||
124 | printf ("%d RSA encrypt operations %llu ms (%d failures)\n", | 124 | printf ("%d RSA encrypt operations %llu ms (%d failures)\n", |
125 | ITER, | 125 | ITER, |
126 | (unsigned long long) | 126 | (unsigned long long) |
127 | GNUNET_TIME_absolute_get_duration (start).value, ok); | 127 | GNUNET_TIME_absolute_get_duration (start).rel_value, ok); |
128 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 128 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
129 | if (ok != 0) | 129 | if (ok != 0) |
130 | return GNUNET_SYSERR; | 130 | return GNUNET_SYSERR; |
@@ -183,7 +183,7 @@ testEncryptDecryptSK () | |||
183 | printf ("%d RSA encrypt/decrypt SK operations %llus (%d failures)\n", | 183 | printf ("%d RSA encrypt/decrypt SK operations %llus (%d failures)\n", |
184 | ITER, | 184 | ITER, |
185 | (unsigned long long) | 185 | (unsigned long long) |
186 | GNUNET_TIME_absolute_get_duration (start).value, ok); | 186 | GNUNET_TIME_absolute_get_duration (start).rel_value, ok); |
187 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 187 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
188 | if (ok != 0) | 188 | if (ok != 0) |
189 | return GNUNET_SYSERR; | 189 | return GNUNET_SYSERR; |
@@ -238,7 +238,7 @@ testSignVerify () | |||
238 | printf ("%d RSA sign/verify operations %llums\n", | 238 | printf ("%d RSA sign/verify operations %llums\n", |
239 | ITER, | 239 | ITER, |
240 | (unsigned long long) | 240 | (unsigned long long) |
241 | GNUNET_TIME_absolute_get_duration (start).value); | 241 | GNUNET_TIME_absolute_get_duration (start).rel_value); |
242 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 242 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
243 | return ok; | 243 | return ok; |
244 | } | 244 | } |
@@ -274,7 +274,7 @@ testSignPerformance () | |||
274 | } | 274 | } |
275 | printf ("%d RSA sign operations %llu ms\n", ITER, | 275 | printf ("%d RSA sign operations %llu ms\n", ITER, |
276 | (unsigned long long) | 276 | (unsigned long long) |
277 | GNUNET_TIME_absolute_get_duration (start).value); | 277 | GNUNET_TIME_absolute_get_duration (start).rel_value); |
278 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 278 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
279 | return ok; | 279 | return ok; |
280 | } | 280 | } |