diff options
author | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:41 -0500 |
---|---|---|
committer | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:41 -0500 |
commit | 11b8179a57e675c6672cbe649c655230ae3e9744 (patch) | |
tree | 2919c366d51e154e65279156fef5b4f97b8fd2f9 /arch/common/blowfish.h | |
parent | 720f5023a8f68aaaa54cb6b7bf46efee23b5b4c3 (diff) |
Import Upstream version 0.4.2.1
Diffstat (limited to 'arch/common/blowfish.h')
-rw-r--r-- | arch/common/blowfish.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/common/blowfish.h b/arch/common/blowfish.h index ad4bdb92..ceec7a96 100644 --- a/arch/common/blowfish.h +++ b/arch/common/blowfish.h @@ -1,6 +1,6 @@ /* * HardInfo - Displays System Information - * Copyright (C) 2003-2006 Leandro A. F. Pereira <leandro@linuxmag.com.br> + * Copyright (C) 2003-2007 Leandro A. F. Pereira <leandro@linuxmag.com.br> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ #include <blowfish.h> -gchar * +static void benchmark_fish(void) { BLOWFISH_CTX ctx; @@ -36,17 +36,14 @@ benchmark_fish(void) gchar *bdata_path; - bdata_path = g_strdup_printf("%s/hardinfo/benchmark.data", - gbr_find_data_dir(PREFIX)); - + bdata_path = g_build_filename(params.path_data, "benchmark.data", NULL); if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) { g_free(bdata_path); - return g_strdup("[Error]\n" - PREFIX "benchmark.data not found=\n"); + return; } shell_view_set_enabled(FALSE); - shell_status_update("Benchmarking..."); + shell_status_update("Performing Blowfish benchmark..."); for (i = 0; i <= 50000; i++) { g_timer_start(timer); @@ -63,8 +60,6 @@ benchmark_fish(void) g_timer_destroy(timer); g_free(bdata_path); - - gchar *retval = g_strdup_printf("[Results <i>(in seconds; lower is better)</i>]\n" - "<b>This Machine</b>=<b>%.2f</b>\n", elapsed); - return benchmark_include_results(retval, "Blowfish"); + + bench_results[BENCHMARK_BLOWFISH] = elapsed; } |