From 5ceb0e5f83f805fea2db32c2383af82ae8bc082a Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 16 Jun 2019 21:58:46 -0500 Subject: [PATCH] [ox/std] Add memory unit consts (KB, MB, GB, TB) --- deps/ox/src/ox/std/units.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 deps/ox/src/ox/std/units.hpp diff --git a/deps/ox/src/ox/std/units.hpp b/deps/ox/src/ox/std/units.hpp new file mode 100644 index 00000000..9f1621ef --- /dev/null +++ b/deps/ox/src/ox/std/units.hpp @@ -0,0 +1,20 @@ +/* + * Copyright 2015 - 2018 gtalent2@gmail.com + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include "types.hpp" + +namespace ox::units { + +constexpr uint64_t KB = 1024; +constexpr uint64_t MB = 1024 * KB; +constexpr uint64_t GB = 1024 * MB; +constexpr uint64_t TB = 1024 * GB; + +}