[ox/std] Add memory unit consts (KB, MB, GB, TB)
This commit is contained in:
parent
5834201fbb
commit
5ceb0e5f83
20
deps/ox/src/ox/std/units.hpp
vendored
Normal file
20
deps/ox/src/ox/std/units.hpp
vendored
Normal file
@ -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;
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user