zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit eef4bbb65f40f5101aeb8e89bb6e6f06343cc2d0 (tree)
parent b229aff34aeef059823c1ab7dfd3a1f5c4445d9e
Author: Harry Eakins <harry.eakins@googlemail.com>
Date:   Thu, 19 Apr 2018 23:54:18 -0700

Changed all MB to MiB

Diffstat:
Mstd/crypto/throughput_test.zig | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/std/crypto/throughput_test.zig b/std/crypto/throughput_test.zig @@ -14,8 +14,8 @@ const c = @cImport({ }); const HashFunction = @import("md5.zig").Md5; -const MB = 1024 * 1024; -const BytesToHash = 1024 * MB; +const MiB = 1024 * 1024; +const BytesToHash = 1024 * MiB; pub fn main() !void { var stdout_file = try std.io.getStdOut(); @@ -37,6 +37,5 @@ pub fn main() !void { const elapsed_s = f64(end - start) / f64(c.CLOCKS_PER_SEC); const throughput = u64(BytesToHash / elapsed_s); - try stdout.print("{}: ", @typeName(HashFunction)); - try stdout.print("{} MB/s\n", throughput / (1 * MB)); + try stdout.print("{}: {} MiB/s\n", @typeName(HashFunction), throughput / (1 * MiB)); }